Skip to content

Commit 86a2a79

Browse files
committed
fix(LayerProperties): don't show slider until view loads layer
1 parent 0021740 commit 86a2a79

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/LayerProperties.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ export default defineComponent({
4040
4141
const blendConfig = computed(
4242
() =>
43-
// assume one 2D view has mounted
44-
layerConfigs.value.find(({ config }) => config)!.config!.blendConfig
43+
// may be undefined if a 2D view has not been mounted
44+
layerConfigs.value.find(({ config }) => config)?.config?.blendConfig
4545
);
4646
4747
const setBlendConfig = (key: keyof BlendConfig, value: any) => {
48+
if (layerConfigs.value.length === 0) return;
4849
layerConfigs.value.forEach(({ viewID }) =>
4950
layerColoringStore.updateBlendConfig(viewID, layerID.value, {
5051
[key]: value,

0 commit comments

Comments
 (0)