From aa18c806b37715a5b13aa7660e098f1fe7319a1c Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Sat, 31 Mar 2018 08:40:08 +0100 Subject: [PATCH] fix: don't throw when required in the repl Fixes #1292 --- lib/utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/index.js b/lib/utils/index.js index 5f1f857b..d49f8c5e 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -21,7 +21,7 @@ var utils = (module.exports = { var p = module.parent; while (p) { // in electron.js engine it happens - if (p.filename === undefined) { + if (!p.filename) { return true; } if (p.filename.indexOf('bin' + path.sep + 'nodemon.js') !== -1) {