Skip to content

Commit b5f82e5

Browse files
committed
fix wrong migration from v1 to v2
1 parent 15ff52c commit b5f82e5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "emulators-ui",
3-
"version": "0.72.6",
3+
"version": "0.72.7",
44
"description": "Emulators UI",
55
"main": "dist/emulators-ui.js",
66
"types": "dist/types/emulators-ui.d.ts",

src/controls/layers-config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ export type LegacyLayersConfig = {[index: string]: LegacyLayerConfig};
7575

7676
export function extractLayersConfig(config: any): LayersConfig | LegacyLayersConfig | null {
7777
if (config.layersConfig !== undefined) {
78+
if (config.layersConfig.version === 1) {
79+
migrateV1ToV2(config.layersConfig);
80+
}
81+
7882
return config.layersConfig;
7983
}
8084

8185
if (config.layers !== undefined) {
82-
if (config.layers.version === 1) {
83-
migrateV1ToV2(config);
84-
}
85-
8686
return config.layers;
8787
}
8888

0 commit comments

Comments
 (0)