msgpackr 1.7.0-alpha5 → 1.7.0-alpha6

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/node.cjs CHANGED
@@ -2224,7 +2224,7 @@ function writeStruct(object, target, position, structures, makeRoom, pack, packr
2224
2224
  refPosition += encodeUtf8(target, value, refPosition);
2225
2225
  isNotAscii = refPosition - strStart > strLength;
2226
2226
  }
2227
- if (refOffset < 0x100) {
2227
+ if (refOffset < 0xf6) {
2228
2228
  if (isNotAscii)
2229
2229
  transition = nextTransition.string8 || createTypeTransition(nextTransition, UTF8, 1);
2230
2230
  else
@@ -2332,7 +2332,7 @@ function writeStruct(object, target, position, structures, makeRoom, pack, packr
2332
2332
  targetView.setUint32(position, refOffset, true);
2333
2333
  position += 4;
2334
2334
  }
2335
- } else {
2335
+ } else { // null or undefined
2336
2336
  transition = nextTransition.object16 || createTypeTransition(nextTransition, OBJECT_DATA, 2);
2337
2337
  targetView.setInt16(position, value === null ? -10 : -9, true);
2338
2338
  position += 2;