diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 7a733b0c3..b3efc39b1 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -167,8 +167,9 @@ define([ return this; }, - setMode: function(mode) { + setMode: function(mode, api) { this.appOptions = mode; + this.api = api; this.customPluginsComplete = !this.appOptions.canBrandingExt; if (this.appOptions.canBrandingExt) this.getAppCustomPlugins(this.configPlugins); @@ -514,7 +515,7 @@ define([ var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'), isEdit = me.appOptions.isEdit, editor = me.editor, - apiVersion = me.api.GetVersion(); + apiVersion = me.api ? me.api.GetVersion() : undefined; if ( pluginsdata instanceof Array ) { var arr = [], arrUI = [], lang = me.appOptions.lang.split(/[\-_]/)[0]; diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index 9902c0113..c96aaeb42 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -562,6 +562,7 @@ define([ this.view.turnChanges(true); } else if ( this.appConfig.canReview ) { + state = (state=='off') ? false : state; // support of prev. version (on/off) if (!!global) { this.api.asc_SetLocalTrackRevisions(null); this.api.asc_SetGlobalTrackRevisions(!!state);