Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
[Fix] use undefined in "done" CreateIterResultObject calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 5, 2018
1 parent 3a6b030 commit f368659
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ contributors: Jordan Harband
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have all of the internal slots of a RegExp String Iterator Object Instance (see <emu-xref href="#PropertiesOfRegExpStringIteratorInstances"></emu-xref>), throw a *TypeError* exception.
1. If _O_.[[Done]] is *true*, then
1. Return ! CreateIterResultObject(*null*, *true*).
1. Return ! CreateIterResultObject(*undefined*, *true*).
1. Let _R_ be _O_.[[IteratingRegExp]].
1. Let _S_ be _O_.[[IteratedString]].
1. Let _global_ be _O_.[[Global]].
1. Let _fullUnicode_ be _O_.[[Unicode]].
1. Let _match_ be ? RegExpExec(_R_, _S_).
1. If _match_ is *null*, then
1. Set _O_.[[Done]] to *true*.
1. Return ! CreateIterResultObject(*null*, *true*).
1. Return ! CreateIterResultObject(*undefined*, *true*).
1. Else,
1. If _global_ is *true*,
1. Let _matchStr_ be ? ToString(? Get(_match_, *"0"*)).
Expand Down
4 changes: 2 additions & 2 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ All RegExp String Iterator Objects inherit properties from the [%RegExpStringIte
1. If [Type][type](O) is not Object, throw a **TypeError** exception.
1. If O does not have all of the internal slots of a RegExp String Iterator Object Instance (see [here](#PropertiesOfRegExpStringIteratorInstances)), throw a **TypeError** exception.
1. If *O*.[[Done]] is **true**, then
1. Return ! [CreateIterResultObject][create-iter-result-object](**null**, **true**).
1. Return ! [CreateIterResultObject][create-iter-result-object](**undefined**, **true**).
1. Let *R* be *O*.[[IteratingRegExp]].
1. Let *S* be *O*.[[IteratedString]].
1. Let *global* be *O*.[[Global]].
1. Let *fullUnicode* be *O*.[[Unicode]].
1. Let *match* be ? [RegExpExec][regexp-exec](*R*, *S*).
1. If *match* is **null**, then
1. Set *O*.[[Done]] to **true**.
1. Return ! [CreateIterResultObject][create-iter-result-object](**null**, **true**).
1. Return ! [CreateIterResultObject][create-iter-result-object](**undefined**, **true**).
1. Else,
1. If *global* is **true**,
1. Let *matchStr* be ? [ToString][to-string](? [Get][get](*match*, **"0"**)).
Expand Down

0 comments on commit f368659

Please sign in to comment.