Skip to content

Commit

Permalink
fix: Guard against undefined token deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lohse committed Sep 23, 2018
1 parent e8c1fa9 commit 13aa217
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonSerialisation.ts
Expand Up @@ -276,7 +276,7 @@ export class JsonSerialisation{
return this.JArrayToContainer(token);
}

if (token == null) // TODO: Check is undefined?
if (token === null || token === undefined)
return null;

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

0 comments on commit 13aa217

Please sign in to comment.