summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrohlfs <brohlfs@google.com>2019-02-28 14:32:11 +0100
committerPaladox none <thomasmulhall410@yahoo.com>2019-03-05 08:52:38 +0000
commita19206b61f930aba272e65688ed08ae291b66d47 (patch)
tree2ac1486153b438174be449194a74ab1520064a61
parent002c7931e2265a54c3890348f9f6ee16d7f67765 (diff)
Fix that an endpoint cannot be used by two plugins anymore
'name' does not exist on the plugin object, so the _initializedPlugins map would store undefined=>true for the first plugin and then don't allow any further plugins. For example the change-view-integration cannot be used by buildbucket and tricium anymore. Change-Id: I5a7adcaf335a0c27453e5eb03e3931d194e001ff (cherry picked from commit f58c8c77ef14d478d26df897fb77cc40e89bf8fc)
-rw-r--r--polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js
index 70eed78926..fe82f2bb14 100644
--- a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js
+++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js
@@ -112,7 +112,7 @@
},
_initModule({moduleName, plugin, type, domHook}) {
- if (this._initializedPlugins.get(plugin.name)) {
+ if (this._initializedPlugins.get(plugin.getPluginName())) {
return;
}
let initPromise;
@@ -128,7 +128,7 @@
console.warn('Unable to initialize module' +
`${moduleName} from ${plugin.getPluginName()}`);
}
- this._initializedPlugins.set(plugin.name, true);
+ this._initializedPlugins.set(plugin.getPluginName(), true);
initPromise.then(el => {
domHook.handleInstanceAttached(el);
this._domHooks.set(el, domHook);