We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e67e8f1 commit fd850dbCopy full SHA for fd850db
web/libs/editor/src/mixins/Tool.js
@@ -56,7 +56,7 @@ const ToolMixin = types
56
},
57
58
get getSelectedShape() {
59
- return self.control.annotation.highlightedNode;
+ return self.control?.annotation?.highlightedNode;
60
61
62
get extraShortcuts() {
@@ -106,7 +106,7 @@ const ToolMixin = types
106
*/
107
shouldSkipInteractions(e) {
108
const isCtrlPressed = e.evt && (e.evt.metaKey || e.evt.ctrlKey);
109
- const hasSelection = self.control.annotation.hasSelection;
+ const hasSelection = self.control?.annotation?.hasSelection;
110
111
return !!isCtrlPressed && !hasSelection;
112
0 commit comments