mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-19 06:46:28 +01:00
fix serializing undefined again oops
This commit is contained in:
parent
6e2dddeab9
commit
c494d1c602
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user