Skip to content

Commit d483ed2

Browse files
committed
fixed a edge case with var injection
1 parent c5cc1d2 commit d483ed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/NormalModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
268268
});
269269
emitFunction();
270270
var start = block.range ? block.range[0] : -10;
271-
var end = block.range ? block.range[1] : _source.size();
271+
var end = block.range ? block.range[1] : (_source.size() + 1);
272272
if(varStartCode) source.insert(start + 0.5, varStartCode);
273273
if(varEndCode) source.insert(end + 0.5, "\n/* WEBPACK VAR INJECTION */" + varEndCode);
274274
}

0 commit comments

Comments
 (0)