diff --git a/README.md b/README.md index 3e78caf0..aeb9260c 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ following attributes: - `file`: Optional. The generated filename this source map is associated with. -- `x_google_ignoreList`: Optional. An additional extension field which is an array +- `ignoreList` (or `x_google_ignoreList`): Optional. An additional extension field which is an array of indices refering to urls in the sources array. This is used to identify third-party sources, that the developer might want to avoid when debugging. [Read more](https://developer.chrome.com/articles/x-google-ignore-list/) diff --git a/lib/source-map-consumer.js b/lib/source-map-consumer.js index 17ef92b1..4bf6944b 100644 --- a/lib/source-map-consumer.js +++ b/lib/source-map-consumer.js @@ -187,10 +187,10 @@ class BasicSourceMapConsumer extends SourceMapConsumer { const sourcesContent = util.getArg(sourceMap, "sourcesContent", null); const mappings = util.getArg(sourceMap, "mappings"); const file = util.getArg(sourceMap, "file", null); - const x_google_ignoreList = util.getArg( + const ignoreList = util.getArg( sourceMap, - "x_google_ignoreList", - null + "ignoreList", + util.getArg(sourceMap, "x_google_ignoreList", null) ); // Once again, Sass deviates from the spec and supplies the version as a @@ -220,7 +220,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer { that._mappings = mappings; that._sourceMapURL = aSourceMapURL; that.file = file; - that.x_google_ignoreList = x_google_ignoreList; + that.ignoreList = ignoreList; + that.x_google_ignoreList = ignoreList; that._computedColumnSpans = false; that._wasmMappings = null; @@ -283,7 +284,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer { * @returns BasicSourceMapConsumer */ static fromSourceMap(aSourceMap, aSourceMapURL) { - return new BasicSourceMapConsumer(aSourceMap.toString()); + return new BasicSourceMapConsumer(aSourceMap.toString(), aSourceMapURL); } get sources() {