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 0e69cd6 commit 96a487c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonSerialisation.ts
Original file line number Diff line number Diff line change
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 96a487c

Please sign in to comment.