From 43b381339a1f4f95a9baeb6feeb08d74ab2f3491 Mon Sep 17 00:00:00 2001 From: Jakob Moosbrugger <jak.moo54@gmail.com> Date: Wed, 19 Apr 2017 23:38:59 +0200 Subject: [PATCH] fixed typo --- lib/index.js | 4 ++-- src/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index 1e54765..3a4db2a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -30,7 +30,7 @@ var Worker = function () { return (/(debug|inspect)/.test(execArg) ); }); - if (debugVars.lenght > 0) { + if (debugVars.length > 0) { if (!options.execArgv) { //if no execArgs are given copy all arguments debugVars = process.execArgv; @@ -45,7 +45,7 @@ var Worker = function () { if (portIndex > 0) { //set new port, ignore "-brk", it doesn't work - debugVars[portIndex] = (/^--debug/.test(debugVars[portIndex]) ? "--debug=" : "--inspect=") + process.debugPort + 1; + debugVars[portIndex] = (/^--debug/.test(debugVars[portIndex]) ? "--debug=" : "--inspect=") + (process.debugPort + 1); } options.execArgv = options.execArgv.concat(debugVars); } diff --git a/src/index.js b/src/index.js index 5778309..fbd5f6d 100644 --- a/src/index.js +++ b/src/index.js @@ -16,7 +16,7 @@ class Worker { var debugVars = process.execArgv.filter(execArg => { return (/(debug|inspect)/).test(execArg); }); - if (debugVars.lenght > 0) { + if (debugVars.length > 0) { if (!options.execArgv) { //if no execArgs are given copy all arguments debugVars = process.execArgv; options.execArgv = []; @@ -27,7 +27,7 @@ class Worker { }); if (portIndex > 0) { //set new port, ignore "-brk", it doesn't work - debugVars[portIndex] = ((/^--debug/).test(debugVars[portIndex]) ? "--debug=" : "--inspect=") + process.debugPort + 1; + debugVars[portIndex] = ((/^--debug/).test(debugVars[portIndex]) ? "--debug=" : "--inspect=") + (process.debugPort + 1); } options.execArgv = options.execArgv.concat(debugVars); -- GitLab