From c494d1c602318d1158781b990ec35c46e8be9e3f Mon Sep 17 00:00:00 2001 From: dank074 Date: Sun, 27 Mar 2022 20:55:22 -0500 Subject: [PATCH] fix serializing undefined again oops --- src/core/communication/codec/evawire/EvaWireFormat.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/communication/codec/evawire/EvaWireFormat.ts b/src/core/communication/codec/evawire/EvaWireFormat.ts index 544b8392..08d2d66b 100644 --- a/src/core/communication/codec/evawire/EvaWireFormat.ts +++ b/src/core/communication/codec/evawire/EvaWireFormat.ts @@ -21,7 +21,7 @@ export class EvaWireFormat implements ICodec if(type === 'object') { - if(value === null || value === undefined) type = 'null'; + if(value === null) type = 'null'; else if(value instanceof Byte) type = 'byte'; else if(value instanceof Short) type = 'short'; else if(value instanceof ArrayBuffer) type = 'arraybuffer'; @@ -29,6 +29,7 @@ export class EvaWireFormat implements ICodec switch(type) { + case 'undefined': case 'null': writer.writeShort(0); break;