[fix] Prevent error when deleting nodes with missing definitions

Adds defensive array access checks in widgetInputs.ts to handle cases where
customSpec is not a valid array when merging widget configurations. This
resolves the 'Cannot read properties of null (reading "1")' error that
occurs when attempting to delete nodes whose definitions have been removed.

Fixes #8338
This commit is contained in:
bymyself
2025-06-08 00:55:59 -07:00
parent f251af25cc
commit 75a56c460d

View File

@@ -506,7 +506,12 @@ export function mergeIfValid(
}
}
return { customConfig: customSpec?.[1] ?? {} }
return {
customConfig:
customSpec && Array.isArray(customSpec) && customSpec[1]
? customSpec[1]
: {}
}
}
app.registerExtension({