File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ ArrayIterator = module.exports = function (arr, kind) {
18
18
} ;
19
19
if ( setPrototypeOf ) setPrototypeOf ( ArrayIterator , Iterator ) ;
20
20
21
+ // Internal %ArrayIteratorPrototype% doesn't expose its constructor
22
+ delete ArrayIterator . prototype . constructor ;
23
+
21
24
ArrayIterator . prototype = Object . create ( Iterator . prototype , {
22
- constructor : d ( ArrayIterator ) ,
23
25
_resolve : d ( function ( i ) {
24
26
if ( this . __kind__ === "value" ) return this . __list__ [ i ] ;
25
27
if ( this . __kind__ === "key+value" ) return [ i , this . __list__ [ i ] ] ;
Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ module.exports = Iterator = function (list, context) {
24
24
context . on ( "_clear" , this . _onClear ) ;
25
25
} ;
26
26
27
+ // Internal %IteratorPrototype% doesn't expose its constructor
28
+ delete Iterator . prototype . constructor ;
29
+
27
30
defineProperties (
28
31
Iterator . prototype ,
29
32
assign (
30
33
{
31
- constructor : d ( Iterator ) ,
32
34
_next : d ( function ( ) {
33
35
var i ;
34
36
if ( ! this . __list__ ) return undefined ;
Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ StringIterator = module.exports = function (str) {
17
17
} ;
18
18
if ( setPrototypeOf ) setPrototypeOf ( StringIterator , Iterator ) ;
19
19
20
+ // Internal %ArrayIteratorPrototype% doesn't expose its constructor
21
+ delete StringIterator . prototype . constructor ;
22
+
20
23
StringIterator . prototype = Object . create ( Iterator . prototype , {
21
- constructor : d ( StringIterator ) ,
22
24
_next : d ( function ( ) {
23
25
if ( ! this . __list__ ) return undefined ;
24
26
if ( this . __nextIndex__ < this . __length__ ) return this . __nextIndex__ ++ ;
You can’t perform that action at this time.
0 commit comments