diff --git a/src/editor/CustomWMSBasemapEditor.tsx b/src/editor/CustomWMSBasemapEditor.tsx index 9251ad3..e596011 100644 --- a/src/editor/CustomWMSBasemapEditor.tsx +++ b/src/editor/CustomWMSBasemapEditor.tsx @@ -77,7 +77,9 @@ export const CustomWMSBasemapEditor = ({ item, value, onChange, context }: Props { setURL(e.currentTarget.value); - (context.options.config.wms.layers as string[]).splice(-1); + if (context.options.config.wms) { + (context.options.config.wms.layers as string[]).splice(-1); + } setOptions([]); setSelection([]); }}>