diff --git a/lib/path.js b/lib/path.js index 4bcb2b3672091c..0c9c656e66c3a7 100644 --- a/lib/path.js +++ b/lib/path.js @@ -408,7 +408,9 @@ var posix = {}; function posixSplitPath(filename) { - return splitPathRe.exec(filename).slice(1); + const out = splitPathRe.exec(filename); + out.shift(); + return out; }