diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 973a3eaa8..eb5375260 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -933,7 +933,7 @@ define([ var toolbar = this.toolbar; if (this.api) { var isModified = this.api.asc_isDocumentCanSave(); - var isSyncButton = toolbar.btnCollabChanges.$icon.hasClass('btn-synch'); + var isSyncButton = toolbar.btnCollabChanges && toolbar.btnCollabChanges.$icon.hasClass('btn-synch'); if (!isModified && !isSyncButton && !toolbar.mode.forcesave) return; diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 9d69e0c5a..ceb2a7fd0 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -889,7 +889,7 @@ define([ var toolbar = this.toolbar; if (this.api && this.api.asc_isDocumentCanSave) { var isModified = this.api.asc_isDocumentCanSave(); - var isSyncButton = this.toolbar.btnCollabChanges.$icon.hasClass('btn-synch'); + var isSyncButton = this.toolbar.btnCollabChanges && this.toolbar.btnCollabChanges.$icon.hasClass('btn-synch'); if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave) return; diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index de0ef8277..4a1d45c35 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -407,7 +407,7 @@ define([ onSave: function(e) { if (this.api) { var isModified = this.api.asc_isDocumentCanSave(); - var isSyncButton = this.toolbar.btnCollabChanges.$icon.hasClass('btn-synch'); + var isSyncButton = this.toolbar.btnCollabChanges && this.toolbar.btnCollabChanges.$icon.hasClass('btn-synch'); if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave) return;