Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 7d48c43

Browse files
throw when this value is Iterator.prototype
1 parent f481720 commit 7d48c43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ <h1>set Iterator.prototype.constructor</h1>
305305
<emu-alg>
306306
1. Let _O_ be ? RequireObjectCoercible(*this* value).
307307
1. If _O_ is %Iterator.prototype%, then
308-
1. Return *undefined*.
308+
1. Throw a *TypeError* exception.
309309
1. Let _desc_ be ? _O_.[[GetOwnProperty]](*"constructor"*).
310310
1. If IsDataDescriptor(_desc_) is *true* and _desc_.[[Writable]] is *false*, then
311311
1. Throw a *TypeError* exception.
@@ -607,7 +607,7 @@ <h1>set Iterator.prototype [ @@toStringTag ]</h1>
607607
<emu-alg>
608608
1. Let _O_ be ? RequireObjectCoercible(*this* value).
609609
1. If _O_ is %Iterator.prototype%, then
610-
1. Return *undefined*.
610+
1. Throw a *TypeError* exception.
611611
1. Let _desc_ be ? _O_.[[GetOwnProperty]](@@toStringTag).
612612
1. If IsDataDescriptor(_desc_) is *true* and _desc_.[[Writable]] is *false*, then
613613
1. Throw a *TypeError* exception.

0 commit comments

Comments
 (0)