Skip to content

Commit 37e1296

Browse files
committed
fix: add null check before calling toJson in reflection response mapping
1 parent 9d857d9 commit 37e1296

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/core/src/reflection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export class ReflectionServer {
193193

194194
response.send(
195195
values.map((v: any) => {
196-
if (typeof v.toJson === 'function') {
196+
if (v && typeof v.toJson === 'function') {
197197
return v.toJson();
198198
}
199199
return v;

0 commit comments

Comments
 (0)