Skip to content

Commit 75425f9

Browse files
committed
RDBC-909 Handle undefined input in JsonSerializer.toPlainObject
1 parent 064ae24 commit 75425f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Mapping/Json/Serializer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export class JsonSerializer {
3939
}
4040

4141
public static toPlainObject<T>(obj: T): T {
42+
if (obj === undefined) {
43+
return undefined as T;
44+
}
45+
4246
return JSON.parse(JSON.stringify(obj));
4347
}
4448
}

0 commit comments

Comments
 (0)