From 1449b92acc44e24986fbb627c9b26ad2cd0f7289 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 24 Apr 2021 23:39:27 +0300 Subject: [PATCH] Fix plugins --- apps/common/main/lib/controller/Plugins.js | 5 +++-- apps/common/main/lib/controller/ReviewChanges.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) 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);