Skip to content

Commit 2391923

Browse files
committed
Stop strict typechecking for Symbol.iterator
`typeof Symbol.iterator === 'symbol'` is not polyfillable
1 parent 8cff1de commit 2391923

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

multi-integer-range.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ export default MultiRange;
498498

499499
// Set ES6 iterator, if Symbol.iterator is defined
500500
/* istanbul ignore else */
501-
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
501+
if (typeof Symbol === 'function' && 'iterator' in Symbol) {
502502
MultiRange.prototype[Symbol.iterator] = MultiRange.prototype.getIterator;
503503
}
504504

0 commit comments

Comments
 (0)