We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a337c5 commit 1735ed2Copy full SHA for 1735ed2
src/Encoder.ts
@@ -339,6 +339,8 @@ export class Encoder<ContextType = undefined> {
339
const ext = this.extensionCodec.tryToEncode(object, this.context);
340
if (ext != null) {
341
this.encodeExtension(ext);
342
+ } else if (object instanceof Number) {
343
+ this.encodeNumber(object.valueOf());
344
} else if (Array.isArray(object)) {
345
this.encodeArray(object, depth);
346
} else if (ArrayBuffer.isView(object)) {
0 commit comments