diff --git a/libs/shared/lib/components/textEditor/plugins/InsertVariablesPlugin.tsx b/libs/shared/lib/components/textEditor/plugins/InsertVariablesPlugin.tsx index baa419ee21901e969d84f266020b926bacb65744..77824221fd8423a2a0d8abfbcd1eb1adb82bd7ee 100644 --- a/libs/shared/lib/components/textEditor/plugins/InsertVariablesPlugin.tsx +++ b/libs/shared/lib/components/textEditor/plugins/InsertVariablesPlugin.tsx @@ -33,9 +33,9 @@ export const InsertVariablesPlugin = () => { const nodeTypes = Object.keys(result.metaData?.nodes.types || {}); function optionsForType(type: string) { - const typeObj = result.metaData?.nodes.types[type] ?? {}; + const typeObj = result.metaData?.nodes.types[type] ?? {attributes: null}; - if (!('attributes' in typeObj)) { + if (!('attributes' in typeObj) || typeObj.attributes == null) { return []; }