fix serializing undefined again oops

This commit is contained in:
dank074 2022-03-27 20:55:22 -05:00
parent 6e2dddeab9
commit c494d1c602

View File

@ -21,7 +21,7 @@ export class EvaWireFormat implements ICodec
if(type === 'object') 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 Byte) type = 'byte';
else if(value instanceof Short) type = 'short'; else if(value instanceof Short) type = 'short';
else if(value instanceof ArrayBuffer) type = 'arraybuffer'; else if(value instanceof ArrayBuffer) type = 'arraybuffer';
@ -29,6 +29,7 @@ export class EvaWireFormat implements ICodec
switch(type) switch(type)
{ {
case 'undefined':
case 'null': case 'null':
writer.writeShort(0); writer.writeShort(0);
break; break;