From da5c48c7367e1ac83400c9c01bc06e3036998609 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 9 Mar 2021 14:48:36 +0300 Subject: [PATCH] Fix Bug 49007 --- apps/common/main/lib/controller/Plugins.js | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 68c4f2ccd..cd37f6a19 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -646,20 +646,24 @@ define([ warn = false; if (plugins.plugins && plugins.plugins.length>0) arr = plugins.plugins; - var val = plugins.config.autostart || plugins.config.autoStartGuid; - if (typeof (val) == 'string') - val = [val]; - warn = !!plugins.config.autoStartGuid; - autostart = val || []; + if (plugins && plugins.config) { + var val = plugins.config.autostart || plugins.config.autoStartGuid; + if (typeof (val) == 'string') + val = [val]; + warn = !!plugins.config.autoStartGuid; + autostart = val || []; + } plugins = this.serverPlugins; if (plugins.plugins && plugins.plugins.length>0) arr = arr.concat(plugins.plugins); - val = plugins.config.autostart || plugins.config.autoStartGuid; - if (typeof (val) == 'string') - val = [val]; - (warn || plugins.config.autoStartGuid) && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - autostart = autostart.concat(val || []); + if (plugins && plugins.config) { + val = plugins.config.autostart || plugins.config.autoStartGuid; + if (typeof (val) == 'string') + val = [val]; + (warn || plugins.config.autoStartGuid) && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); + autostart = autostart.concat(val || []); + } this.autostart = autostart; this.parsePlugins(arr, false);