Skip to content

Commit ef7ff53

Browse files
committed
Move null check into decode operation
1 parent 42e6c38 commit ef7ff53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec.emu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,6 @@
685685
1. Let _sources_ be DecodeSourceMapSources(_baseURL_, _sourceRootField_, _sourcesField_, _sourcesContentField_, _ignoreListField_).
686686
1. Let _namesField_ be GetOptionalListOfStrings(_json_, *"names"*).
687687
1. <ins>Let _rangeMappingsField_ be GetOptionalString(_json_, *"rangeMappings"*).</ins>
688-
1. <ins>If _rangeMappingsField_ is *null*, set _rangeMappingsField_ to *""*.</ins>
689688
1. <ins>Let _rangeMappings_ be DecodeRangeMappings(_rangeMappingsField_).</ins>
690689
1. Let _mappings_ be DecodeMappings(_mappingsField_, _namesField_, _sources_, <ins>_rangeMappings_</ins>).
691690
1. [declared="a,b"] Sort _mappings_ in ascending order, with a Decoded Mapping Record _a_ being less than a Decoded Mapping Record _b_ if ComparePositions(_a_.[[GeneratedPosition]], _b_.[[GeneratedPosition]]) is ~lesser~.
@@ -1239,12 +1238,13 @@
12391238
<emu-clause id="sec-DecodeRangeMappings" type="abstract operation">
12401239
<h1>
12411240
DecodeRangeMappings (
1242-
_rawRangeMappings_: a String,
1241+
_rawRangeMappings_: a String or *null*,
12431242
): a List of Decoded Range Mapping Offset Records
12441243
</h1>
12451244
<dl class="header"></dl>
12461245
<emu-alg>
12471246
1. Let _rangeMappings_ be a new empty List.
1247+
1. If _rawRangeMappings_ is *null*, set _rawRangeMappings_ to *""*.
12481248
1. Let _rangeMappingsNode_ be the root Parse Node when parsing _rawRangeMappings_ using |RangeMappingsField| as the goal symbol.
12491249
1. If parsing failed, then
12501250
1. Optionally report an error.

0 commit comments

Comments
 (0)