Skip to content

Commit 7e08847

Browse files
committed
fixes webpack#266
1 parent 01c017e commit 7e08847

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/RequestShortener.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function RequestShortener(directory) {
2424

2525
if(__dirname.length >= 2) {
2626
var buildins = path.join(__dirname, "..");
27-
var buildinsAsModule = currentDirectoryRegExp.test(buildins);
27+
var buildinsAsModule = currentDirectoryRegExp && currentDirectoryRegExp.test(buildins);
2828
var buildinsRegExp = buildins.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
2929
buildinsRegExp = new RegExp("^" + buildinsRegExp + "|(!)" + buildinsRegExp, "g");
3030

0 commit comments

Comments
 (0)