From 45c032aaef9def856376845382ec9e6333fb40c3 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Wed, 7 Jun 2017 19:14:45 +0200 Subject: [PATCH] [fix] Bug when duniter UI is launched through Nw.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2844ffa..30a29e7 100644 --- a/index.js +++ b/index.js @@ -191,7 +191,7 @@ function listPlugins(conditionTest) { } catch (e) {} } // Special: self dependency (if local package is also a module) - if (pkgJSON.main) { + if (pkgJSON.main && pkgJSON.main.match(/\.js/)) { // With NW.js, the main is an index.html file, which causes a bug const dep = pkgJSON.name const required = require(path.resolve('./' + pkgJSON.main)) if (required && conditionTest(required)) { -- GitLab