From 4a1d6e406acec92e391cd30b8fe665b8bfbfac88 Mon Sep 17 00:00:00 2001 From: dank074 Date: Sun, 27 Mar 2022 15:22:52 -0500 Subject: [PATCH] fix serializing undefined --- src/core/communication/codec/evawire/EvaWireFormat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/communication/codec/evawire/EvaWireFormat.ts b/src/core/communication/codec/evawire/EvaWireFormat.ts index 4869fe6a..544b8392 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) type = 'null'; + if(value === null || value === undefined) type = 'null'; else if(value instanceof Byte) type = 'byte'; else if(value instanceof Short) type = 'short'; else if(value instanceof ArrayBuffer) type = 'arraybuffer';