diff --git a/source/state.ts b/source/state.ts index 43e441a..2759ca0 100644 --- a/source/state.ts +++ b/source/state.ts @@ -194,7 +194,7 @@ export abstract class State { () => Array.prototype.slice.call(object, 0) ); } - else if (object instanceof WeakMap || object instanceof Map) { + else if (object instanceof Map) { return metaOperations( // Update map key (parent, key: number | string, value: K) => { @@ -217,9 +217,7 @@ export abstract class State { }, // Clone - () => object instanceof WeakMap - ? new WeakMap( object) - : new Map( object) + () => new Map( object) ); } else if (object instanceof WeakSet || object instanceof Set) {