Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

Expand Down
11 changes: 6 additions & 5 deletions lib/source-map-consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down