fix[js]: javascript support compatible field

This commit is contained in:
sun
2023-10-16 12:21:14 +08:00
parent 1475e640c6
commit 6e9a0c53fc
9 changed files with 13435 additions and 12 deletions
@@ -235,6 +235,7 @@ const ByteBuffer = function() {
if (!(minInt <= value && value <= maxInt)) {
throw new Error('value must range between minInt:-2147483648 and maxInt:2147483647');
}
value = encodeZigzagInt(value);
if (value >>> 7 === 0) {
return 1;
}