Skip to content

Commit

Permalink
Ignore undefined content in generating source maps (#3360)
Browse files Browse the repository at this point in the history
  • Loading branch information
cthrax authored and matthew-dean committed Feb 21, 2019
1 parent 6155c4d commit 5cc99b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/less/source-map-output.js
Expand Up @@ -69,6 +69,12 @@ module.exports = function (environment) {
// adjust the source
inputSource = inputSource.slice(this._contentsIgnoredCharsMap[fileInfo.filename]);
}

// ignore empty content
if (inputSource === undefined) {
return;
}

inputSource = inputSource.substring(0, index);
sourceLines = inputSource.split('\n');
sourceColumns = sourceLines[sourceLines.length - 1];
Expand Down

0 comments on commit 5cc99b5

Please sign in to comment.