Fix Bug 39254

This commit is contained in:
Julia Radzhabova 2018-10-09 16:15:26 +03:00
parent 975f66a66a
commit 0525597e79
3 changed files with 3 additions and 3 deletions

View file

@ -933,7 +933,7 @@ define([
var toolbar = this.toolbar; var toolbar = this.toolbar;
if (this.api) { if (this.api) {
var isModified = this.api.asc_isDocumentCanSave(); 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) if (!isModified && !isSyncButton && !toolbar.mode.forcesave)
return; return;

View file

@ -889,7 +889,7 @@ define([
var toolbar = this.toolbar; var toolbar = this.toolbar;
if (this.api && this.api.asc_isDocumentCanSave) { if (this.api && this.api.asc_isDocumentCanSave) {
var isModified = 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) if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave)
return; return;

View file

@ -407,7 +407,7 @@ define([
onSave: function(e) { onSave: function(e) {
if (this.api) { if (this.api) {
var isModified = 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) if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave)
return; return;