fix: proper undefined handling

This commit is contained in:
TrèsAbhi committed 2024-02-20 21:52:34 -06:00
1 parent 3ecc87431a
commit 6fd8b83d39
2 files changed
+9 -1

No files matched your search

+3 -1
View File
@@ -290,7 +290,9 @@ export class CdonWriteStream extends WriteStream {
this.value(fastStringFormat, value, stringTable),
);
} else if (object !== undefined) {
const entries = Object.entries(object);
const entries = Object.entries(object).filter(
([, value]) => value !== undefined,
);
this.uint8(ValueType.Object);
this.uint32(entries.length);