From 7ec66e22759e61d22d8480886896e5ea8e05c96a Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Tue, 7 Dec 2021 18:58:01 +0100 Subject: [PATCH] Fix `plugins.js` regression --- panel/src/config/plugins.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/panel/src/config/plugins.js b/panel/src/config/plugins.js index 79c7d346f8..68e63e39fe 100644 --- a/panel/src/config/plugins.js +++ b/panel/src/config/plugins.js @@ -39,19 +39,20 @@ export default { // if component doesn't exist, don't extend options.extends = null; } + } - if (options.mixins) { - options.mixins = options.mixins.map((mixin) => { - return typeof mixin === "string" ? mixins[mixin] : mixin; - }); - } + if (options.template) { + options.render = null; + } - if (components[name]) { - window.console.warn(`Plugin is replacing "${name}"`); - } + if (options.mixins) { + options.mixins = options.mixins.map((mixin) => { + return typeof mixin === "string" ? mixins[mixin] : mixin; + }); + } - app.component(name, options); - components[name] = app.options.components[name]; + if (components[name]) { + window.console.warn(`Plugin is replacing "${name}"`); } app.component(name, options);