Skip to content

Commit 13aa217

Browse files
committed
fix: Guard against undefined token deserialization
1 parent e8c1fa9 commit 13aa217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonSerialisation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export class JsonSerialisation{
276276
return this.JArrayToContainer(token);
277277
}
278278

279-
if (token == null) // TODO: Check is undefined?
279+
if (token === null || token === undefined)
280280
return null;
281281

282282
throw new Error('Failed to convert token to runtime object: ' + JSON.stringify(token));

0 commit comments

Comments
 (0)