File tree 1 file changed +4
-6
lines changed
packages/app-frontend/src/features/timeline/composable
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -40,19 +40,17 @@ export function layerFactory(options: LayerFromBackend): Layer {
40
40
41
41
export function getLayers ( appId : string ) {
42
42
let layers = layersPerApp . value [ appId ]
43
- if ( ! layers ) {
44
- layers = [ ]
45
- layersPerApp . value [ appId ] = layers
43
+ if ( ! layers || ! Array . isArray ( layers ) ) {
44
+ layersPerApp . value [ appId ] = [ ]
46
45
layers = layersPerApp . value [ appId ]
47
46
}
48
47
return layers
49
48
}
50
49
51
50
function getHiddenLayers ( appId : string ) {
52
51
let layers = hiddenLayersPerApp . value [ appId ]
53
- if ( ! layers ) {
54
- layers = [ ]
55
- hiddenLayersPerApp . value [ appId ] = layers
52
+ if ( ! layers || ! Array . isArray ( layers ) ) {
53
+ hiddenLayersPerApp . value [ appId ] = [ ]
56
54
layers = hiddenLayersPerApp . value [ appId ]
57
55
}
58
56
return layers
You can’t perform that action at this time.
0 commit comments