Skip to content

Commit 62aaf1d

Browse files
committed
more clear naming
1 parent 0c71663 commit 62aaf1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

loader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ define([
2929
IdentityProvider,
3030
MCWSPersistenceProviderPlugin
3131
) {
32-
const optionalPlugins = ['BarChart'];
32+
const ALLOWED_OPTIONAL_PLUGINS = ['BarChart'];
3333

3434
function loader(config) {
3535
let persistenceLoaded;
@@ -127,7 +127,7 @@ define([
127127
const pluginErrors = [];
128128
const pluginsToInstall = Object.keys(config.plugins).filter((plugin) => {
129129
const isSummaryWidget = plugin === 'summaryWidgets';
130-
const allowedPlugin = optionalPlugins.includes(plugin);
130+
const allowedPlugin = ALLOWED_OPTIONAL_PLUGINS.includes(plugin);
131131
const pluginEnabled = config.plugins[plugin]?.enabled;
132132

133133
if (!allowedPlugin && !isSummaryWidget) {
@@ -140,7 +140,7 @@ define([
140140
// Warn if any plugins are not supported
141141
if (pluginErrors.length > 0) {
142142
console.warn(
143-
`Unable to install plugins: ${pluginErrors.join(', ')}. Please verify the plugin name is correct and is included in the supported plugins list. Available plugins: ${optionalPlugins.join(', ')}`
143+
`Unable to install plugins: ${pluginErrors.join(', ')}. Please verify the plugin name is correct and is included in the supported plugins list. Available plugins: ${ALLOWED_OPTIONAL_PLUGINS.join(', ')}`
144144
);
145145
}
146146

0 commit comments

Comments
 (0)