diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index fcf944a69..51e16aae8 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -733,18 +733,19 @@ define([ }, onEditorPermissions: function(params) { - var licType = params.asc_getLicenseType(); - if (Asc.c_oLicenseResult.Expired === licType || Asc.c_oLicenseResult.Error === licType) { - Common.UI.warning({ - title: this.titleLicenseExp, - msg: this.warnLicenseExp, - buttons: [], - closable: false - }); - return; - } + var licType = params ? params.asc_getLicenseType() : Asc.c_oLicenseResult.Error; + + if ( params && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge)) { + if (Asc.c_oLicenseResult.Expired === licType || Asc.c_oLicenseResult.Error === licType) { + Common.UI.warning({ + title: this.titleLicenseExp, + msg: this.warnLicenseExp, + buttons: [], + closable: false + }); + return; + } - if ( params && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge)) { this.appOptions.canAutosave = true; this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();