allows empty strings and zeros props to be serialized

This commit is contained in:
iltabe
2024-06-24 09:45:09 +02:00
parent 08d1bffdf6
commit ac242f5f2f
@@ -53,7 +53,7 @@ export class Serializer implements IDisposable {
for (const propKey in obj) {
const value = obj[propKey]
// 0. skip some props
if (!value || propKey === 'id' || propKey.startsWith('_')) continue
if (value === undefined || propKey === 'id' || propKey.startsWith('_')) continue
// 1. primitives (numbers, bools, strings)
if (typeof value !== 'object') {