From 32db1751213a0cf12213e3d6e56559ef4df3ec90 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Fri, 10 Apr 2026 16:30:28 +0200 Subject: [PATCH] Do not hard fail upon duplicated plugins --- app/index.template.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/index.template.js b/app/index.template.js index e584c1b..45a14f6 100644 --- a/app/index.template.js +++ b/app/index.template.js @@ -39,7 +39,7 @@ async function createModule(scope, module) { * The main entry point for the application. */ export async function main() { - const allPlugins = []; + const allPlugins = []; const pluginsToRegister = [ pathsPlugin, translatorPlugin, ...spectaPlugins ]; const federatedExtensionPromises = []; const federatedMimeExtensionPromises = []; @@ -202,7 +202,13 @@ export async function main() { const pluginRegistry = new PluginRegistry(); // 2. Register the plugins - pluginRegistry.registerPlugins(pluginsToRegister); + for (const plugin of pluginsToRegister) { + try { + pluginRegistry.registerPlugin(plugin); + } catch(e) { + console.error(e); + } + } // 3. Get and resolve the service manager and connection status plugins const IServiceManager = require('@jupyterlab/services').IServiceManager;