Skip to content

Commit 6addfe3

Browse files
committed
ui: check if node has parent before assuming. fixes #269
1 parent ac6e840 commit 6addfe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ui/node/editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const NodeEditor: m.Component = {
4242
id = id+"-value";
4343
}
4444
let editor = TextAreaEditor;
45-
if (node.parent.hasComponent(Document) && window.Editor) {
45+
if (node.parent && node.parent.hasComponent(Document) && window.Editor) {
4646
editor = CodeMirrorEditor;
4747
}
4848
return m(editor, {id, getter, setter, display, onkeydown, onfocus, oninput, placeholder});

0 commit comments

Comments
 (0)