editor: minor usability tweak
[fnpeditor.git] / src / editor / modules / documentCanvas / canvas / keyboard.js
index fc8be1e..4cf3d77 100644 (file)
@@ -298,7 +298,9 @@ handlers.push({keys: [KEYS.BACKSPACE, KEYS.DELETE],
                 }
                 if(element) {
                     goto = element.wlxmlNode.mergeContentUp();
-                    canvas.setCurrentElement(goto.node, {caretTo: goto.offset});
+                    if(goto) {
+                        canvas.setCurrentElement(goto.node, {caretTo: goto.offset});
+                    }
                 }
                 event.preventDefault();
             }