diff --git a/source/session.ts b/source/session.ts index 2749c5b..bd5eaf4 100644 --- a/source/session.ts +++ b/source/session.ts @@ -370,7 +370,7 @@ export class Session { if (Array.isArray(data)) { return this._decodeArray(data, identityMap, decodeDatesAsIso); } - if (typeof data === "object" && data?.constructor === Object) { + if (!!data && typeof data === "object") { if (data.__entity_type__) { return this._mergeEntity(data, identityMap, decodeDatesAsIso); }