We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0021740 commit 86a2a79Copy full SHA for 86a2a79
1 file changed
src/components/LayerProperties.vue
@@ -40,11 +40,12 @@ export default defineComponent({
40
41
const blendConfig = computed(
42
() =>
43
- // assume one 2D view has mounted
44
- layerConfigs.value.find(({ config }) => config)!.config!.blendConfig
+ // may be undefined if a 2D view has not been mounted
+ layerConfigs.value.find(({ config }) => config)?.config?.blendConfig
45
);
46
47
const setBlendConfig = (key: keyof BlendConfig, value: any) => {
48
+ if (layerConfigs.value.length === 0) return;
49
layerConfigs.value.forEach(({ viewID }) =>
50
layerColoringStore.updateBlendConfig(viewID, layerID.value, {
51
[key]: value,
0 commit comments