Skip to content

Commit 32db175

Browse files
committed
Do not hard fail upon duplicated plugins
1 parent 49396fd commit 32db175

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎app/index.template.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function createModule(scope, module) {
3939
* The main entry point for the application.
4040
*/
4141
export async function main() {
42-
const allPlugins = [];
42+
const allPlugins = [];
4343
const pluginsToRegister = [ pathsPlugin, translatorPlugin, ...spectaPlugins ];
4444
const federatedExtensionPromises = [];
4545
const federatedMimeExtensionPromises = [];
@@ -202,7 +202,13 @@ export async function main() {
202202
const pluginRegistry = new PluginRegistry();
203203

204204
// 2. Register the plugins
205-
pluginRegistry.registerPlugins(pluginsToRegister);
205+
for (const plugin of pluginsToRegister) {
206+
try {
207+
pluginRegistry.registerPlugin(plugin);
208+
} catch(e) {
209+
console.error(e);
210+
}
211+
}
206212

207213
// 3. Get and resolve the service manager and connection status plugins
208214
const IServiceManager = require('@jupyterlab/services').IServiceManager;

0 commit comments

Comments
 (0)