This repository was archived by the owner on Feb 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Bug: val is not iterable #55
Copy link
Copy link
Open
Description
The following code cannot work with WeakMap and WeakSet which are not iterable.
r7insight_node/src/serialize.js
Lines 10 to 17 in 994db2d
| const isNewIterable = (val) => { | |
| const isMap = (Map && val instanceof Map); | |
| const isSet = (Set && val instanceof Set); | |
| const isWeakMap = (WeakMap && val instanceof WeakMap); | |
| const isWeakSet = (WeakSet && val instanceof WeakSet); | |
| return isMap || isSet || isWeakMap || isWeakSet; | |
| }; |
r7insight_node/src/serialize.js
Lines 120 to 122 in 994db2d
| } else if (isNewIterable(val)) { | |
| return [...val]; | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
