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
7 changes: 5 additions & 2 deletions lib/source-map-consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
"x_google_ignoreList",
null
);
// Support the renamed `ignoreList` field (spec rename of x_google_ignoreList).
const ignoreList = util.getArg(sourceMap, "ignoreList", null);

// Once again, Sass deviates from the spec and supplies the version as a
// string rather than a number, so we use loose equality checking here.
Expand Down Expand Up @@ -220,7 +222,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
that._mappings = mappings;
that._sourceMapURL = aSourceMapURL;
that.file = file;
that.x_google_ignoreList = x_google_ignoreList;
that.x_google_ignoreList = x_google_ignoreList || ignoreList;
that.ignoreList = that.x_google_ignoreList;

that._computedColumnSpans = false;
that._wasmMappings = null;
Expand Down Expand Up @@ -283,7 +286,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
2 changes: 1 addition & 1 deletion source-map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export class SourceMapGenerator {
}

export class SourceNode {
children: SourceNode[];
children: (SourceNode | string)[];
sourceContents: any;
line: number;
column: number;
Expand Down