progeny icon indicating copy to clipboard operation
progeny copied to clipboard

TypeError: Cannot read property 'match' of null

Open orelmi opened this issue 7 years ago • 6 comments

I get this error when building with gulp.

    .map(function (val) {
     ^

TypeError: Cannot read property 'match' of null at C:\Users\xxxx\node_modules\progeny\index.js:106:21 at Array.map (native) at parseDeps (C:\Users\xxxx\node_modules\progeny\index.js:104:10) at C:\Users\xxxx\node_modules\progeny\index.js:270:9 at tryToString (fs.js:455:3) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)

I changed the code like that ( if (val != null) added) and it works fine. Please, tell me why val can be . If the change is correct add it to the repository.

(index.js) at line 104

.map(function (val) { var last = multipass[multipass.length - 1]; if (val != null) return val.match(last)[1]; });

Thanks

orelmi avatar Mar 06 '17 20:03 orelmi