Skip to content

Commit 3050156

Browse files
committed
Merge pull request webpack#316 from Taytay/patch-1
Fix: "*" was being appended to sources too often
2 parents d32f6e6 + 7dc54a1 commit 3050156

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/SourceMapDevToolPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SourceMapDevToolPlugin.prototype.apply = function(compiler) {
4444
str = str.split("!");
4545
str = str.pop() + (str.length > 0 ? " " + str.join("!") : "");
4646
var idx;
47-
while((idx = sourceMap.sources.indexOf(str) >= 0) && (idx < i)) {
47+
while ((idx = sourceMap.sources.indexOf(str)) && (idx >= 0) && (idx < i)) {
4848
str += "*";
4949
}
5050
sourceMap.sources[i] = str;
@@ -80,4 +80,4 @@ SourceMapDevToolPlugin.prototype.apply = function(compiler) {
8080
function basename(name) {
8181
if(name.indexOf("/") < 0) return name;
8282
return name.substr(name.lastIndexOf("/")+1);
83-
}
83+
}

0 commit comments

Comments
 (0)