fix: don't throw when required in the repl

Fixes #1292
This commit is contained in:
Remy Sharp
2018-03-31 08:40:08 +01:00
parent 89d6062c68
commit aa18c806b3

View File

@@ -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) {