msgpackr 1.11.5 → 1.11.6
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.
- package/dist/index-no-eval.cjs +2 -1
- package/dist/index-no-eval.cjs.map +1 -1
- package/dist/index-no-eval.min.js +1 -1
- package/dist/index-no-eval.min.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/node.cjs +5 -1
- package/dist/node.cjs.map +1 -1
- package/dist/test.js +2 -1
- package/dist/test.js.map +1 -1
- package/index.d.cts +1 -0
- package/index.d.ts +1 -0
- package/node-index.js +1 -1
- package/pack.d.cts +1 -1
- package/pack.d.ts +1 -1
- package/pack.js +2 -1
- package/package.json +1 -1
package/dist/test.js
CHANGED
|
@@ -1338,7 +1338,8 @@
|
|
|
1338
1338
|
hasSharedUpdate = false;
|
|
1339
1339
|
let encodingError;
|
|
1340
1340
|
try {
|
|
1341
|
-
if (packr.randomAccessStructure && value && value.constructor && value.constructor === Object
|
|
1341
|
+
if (packr.randomAccessStructure && value && value.constructor && (value.constructor === Object ||
|
|
1342
|
+
(value.constructor !== Map && !Array.isArray(value) && !extensionClasses.some(extClass => value instanceof extClass))))
|
|
1342
1343
|
writeStruct(value);
|
|
1343
1344
|
else
|
|
1344
1345
|
pack(value);
|