wenay-common2 1.0.55 → 1.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -122,6 +122,9 @@ function snapshotValue(value, seen = new WeakMap()) {
122
122
  value = (0, reactive2_1.toRaw)(value);
123
123
  if (!isObj(value))
124
124
  return value;
125
+ const old = seen.get(value);
126
+ if (old)
127
+ return old;
125
128
  if (value instanceof Date)
126
129
  return new Date(value.valueOf());
127
130
  if (value instanceof RegExp)
@@ -138,9 +141,6 @@ function snapshotValue(value, seen = new WeakMap()) {
138
141
  value.forEach(v => out.add(snapshotValue(v, seen)));
139
142
  return out;
140
143
  }
141
- const old = seen.get(value);
142
- if (old)
143
- return old;
144
144
  const out = Array.isArray(value) ? [] : {};
145
145
  seen.set(value, out);
146
146
  for (const k of Reflect.ownKeys(value))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenay-common2",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Common library",
5
5
  "strict": true,
6
6
  "main": "lib/index.js",