Skip to content

Commit f2f4d5d

Browse files
authored
fix: decoding objects doesn't work properly from Jest (#186)
Update session.ts
1 parent 39c5e92 commit f2f4d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export class Session {
370370
if (Array.isArray(data)) {
371371
return this._decodeArray(data, identityMap, decodeDatesAsIso);
372372
}
373-
if (typeof data === "object" && data?.constructor === Object) {
373+
if (!!data && typeof data === "object") {
374374
if (data.__entity_type__) {
375375
return this._mergeEntity(data, identityMap, decodeDatesAsIso);
376376
}

0 commit comments

Comments
 (0)