Open hwluo12 opened 2 years ago
What behavior did you expect in this case?
将代码中的typeof value[Symbol.iterator] === 'function'改为typeof value[Symbol.iterator] === 'function' && typeof value.next === "function" 就行了。不符合标准的迭代器是没有next方法的。
您好,您的邮件我已收到,稍后会回复您。
If an iterable's @@iterator method does not return an iterator object, then it is a non-well-formed iterable. Just like this:
You will get an error: