Skip to content

Commit

Permalink
Merge pull request #71 from g-gomez/master
Browse files Browse the repository at this point in the history
Correct regex on CommonJS parser to detect a core module
  • Loading branch information
pahen committed Nov 25, 2015
2 parents 39e5c4e + 67a449a commit 0df1648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse/cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ util.inherits(CJS, Base);
*/
CJS.prototype.normalize = function (filename) {
filename = this.replaceBackslashInPath(filename);
if (filename.charAt(0) !== '/' && !filename.match(/^[a-z]:\//i)) {
if (filename.charAt(0) !== '/' && !filename.match(/^[a-z]+\//i)) {
// a core module (not mapped to a file)
return filename;
}
Expand Down

0 comments on commit 0df1648

Please sign in to comment.