diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index baec6aa61..6dff51c7a 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1936,7 +1936,7 @@ define([ if ( !uiCustomize ) { if (pluginStore) pluginStore.reset(arr); - this.appOptions.canPlugins = (pluginStore.length > 0); + this.appOptions.canPlugins = !pluginStore.isEmpty(); } } else if (!uiCustomize){ this.appOptions.canPlugins = false; diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 2675b073c..3041f25b2 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1708,12 +1708,9 @@ define([ if (uiCustomize!==false) // from ui customizer in editor config or desktop event this.UICustomizePlugins = arrUI; - if (uiCustomize === undefined) { // for desktop + if ( !uiCustomize ) { if (pluginStore) pluginStore.reset(arr); - this.appOptions.canPlugins = (pluginStore.length>0); - } else if (!uiCustomize) { - if (pluginStore) pluginStore.add(arr); - this.appOptions.canPlugins = (pluginStore.length>0); + this.appOptions.canPlugins = !pluginStore.isEmpty(); } } else if (!uiCustomize){ this.appOptions.canPlugins = false; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 9c1aaa252..ec1fef52d 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1893,12 +1893,9 @@ define([ if (uiCustomize!==false) // from ui customizer in editor config or desktop event this.UICustomizePlugins = arrUI; - if (uiCustomize === undefined) { // for desktop + if (!uiCustomize) { if (pluginStore) pluginStore.reset(arr); - this.appOptions.canPlugins = (pluginStore.length>0); - } else if (!uiCustomize) { - if (pluginStore) pluginStore.add(arr); - this.appOptions.canPlugins = (pluginStore.length>0); + this.appOptions.canPlugins = !pluginStore.isEmpty(); } } else if (!uiCustomize){ this.appOptions.canPlugins = false;