diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index d43bd5099..effcaa67d 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -148,6 +148,8 @@ define([ }; function applyUsers(count, originalCount) { + if (!$btnUsers) return; + var has_edit_users = count > 1 || count > 0 && appConfig && !appConfig.isEdit && !appConfig.isRestrictedEdit; // has other user(s) who edit document if ( has_edit_users ) { $btnUsers diff --git a/apps/documenteditor/mobile/app/controller/edit/EditChart.js b/apps/documenteditor/mobile/app/controller/edit/EditChart.js index 07d1bc962..ae251e88d 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditChart.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditChart.js @@ -265,6 +265,8 @@ define([ }, _initBorderColorView: function () { + if (!_shapeObject) return; + var me = this, paletteBorderColor = me.getView('EditChart').paletteBorderColor, stroke = _shapeObject.get_ShapeProperties().get_stroke(); diff --git a/apps/documenteditor/mobile/app/controller/edit/EditShape.js b/apps/documenteditor/mobile/app/controller/edit/EditShape.js index 500c620f2..f0e783ab5 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditShape.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditShape.js @@ -261,6 +261,8 @@ define([ }, _initBorderColorView: function () { + if (!_shapeObject) return; + var me = this, paletteBorderColor = me.getView('EditShape').paletteBorderColor, stroke = _shapeObject.get_ShapeProperties().get_stroke(); diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index a1c5c4591..2df59a8f0 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -226,7 +226,7 @@ define([ this.$el.show(); this.selectMenu(panel, defPanel); - this.api.asc_enableKeyEvents(false); + this.api && this.api.asc_enableKeyEvents(false); this.fireEvent('menu:show', [this]); }, @@ -234,7 +234,7 @@ define([ hide: function() { this.$el.hide(); this.fireEvent('menu:hide', [this]); - this.api.asc_enableKeyEvents(true); + this.api && this.api.asc_enableKeyEvents(true); }, applyMode: function() { diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditChart.js b/apps/presentationeditor/mobile/app/controller/edit/EditChart.js index b69b5f4ed..8d74ad35d 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditChart.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditChart.js @@ -199,6 +199,8 @@ define([ }, _initBorderColorView: function () { + if (!_shapeObject) return; + var me = this, paletteBorderColor = me.getView('EditChart').paletteBorderColor, stroke = _shapeObject.get_stroke(); diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js index 37fc11849..70d907454 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js @@ -194,6 +194,8 @@ define([ }, _initBorderColorView: function () { + if (!_shapeObject) return; + var me = this, paletteBorderColor = me.getView('EditShape').paletteBorderColor, stroke = _shapeObject.get_stroke(); diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js index 520991676..d3a32529d 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js @@ -230,6 +230,8 @@ define([ }, _initBorderColorView: function () { + if (!_shapeObject) return; + var me = this, stroke = _shapeObject.get_ShapeProperties().get_stroke(); diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js index c7a689ee2..12ac7ca7e 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js @@ -199,6 +199,8 @@ define([ }, _initBorderColorView: function () { + if (!_shapeObject) return; + var me = this, stroke = _shapeObject.get_ShapeProperties().get_stroke();