Skip to content

Commit 85f6b9c

Browse files
+if ngAnnotate do nothing, return map and result untouched
1 parent 683d614 commit 85f6b9c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

loader.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ module.exports = function(source, inputSourceMap) {
7474
this.cacheable && this.cacheable();
7575

7676
var annotateResult = ngAnnotate(source, getOptions.call(this, sourceMapEnabled, filename));
77-
var outputSourceMap = mergeSourceMaps.call(this, inputSourceMap, annotateResult.map);
7877

79-
this.callback(null, annotateResult.src || source, outputSourceMap);
78+
if (annotateResult.src !== source) {
79+
var outputSourceMap = mergeSourceMaps.call(this, inputSourceMap, annotateResult.map);
80+
this.callback(null, annotateResult.src || source, outputSourceMap);
81+
} else {
82+
// if ngAnnotate do nothing, return map and result untouched
83+
this.callback(null, source, inputSourceMap);
84+
}
8085
};

0 commit comments

Comments
 (0)