diff --git a/lib/utils/index.js b/lib/utils/index.js index d223da28..b8a8dafa 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -16,7 +16,11 @@ var utils = module.exports = { isLinux: process.platform === 'linux', isRequired: (function () { var p = module.parent; - while (p) { + while (p) { + // in electron.js engine it happens + if (p.filename === undefined) { + return true; + } if (p.filename.indexOf('bin' + path.sep + 'nodemon.js') !== -1) { return false; } @@ -87,4 +91,4 @@ Object.defineProperty(utils, 'colours', { get: function () { return this.log.useColours; }, -}); \ No newline at end of file +});