diff --git a/apps/presentationeditor/main/app/view/Statusbar.js b/apps/presentationeditor/main/app/view/Statusbar.js index 37115083b..f1fb78d5f 100644 --- a/apps/presentationeditor/main/app/view/Statusbar.js +++ b/apps/presentationeditor/main/app/view/Statusbar.js @@ -392,7 +392,7 @@ define([ }, onApiFocusObject: function(selectedObjects) { - if (!this.mode.isEdit) return; + if (!this.mode || !this.mode.isEdit) return; this._state.no_paragraph = true; var i = -1; diff --git a/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js b/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js index 082b2c530..8efae1779 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js +++ b/apps/spreadsheeteditor/mobile/app/controller/CellEditor.js @@ -168,7 +168,7 @@ define([ }, onInsertFunction: function() { - if (this.mode.isEdit) { + if (this.mode && this.mode.isEdit) { SSE.getController('AddContainer').showModal({ panel: 'function', button: '#ce-function'