Skip to content

Commit

Permalink
fix(getmarbletokenvalue): Check for undefined values for given token
Browse files Browse the repository at this point in the history
Test explicitly for undefined values so that values like { a : false | null | 0 } get passed through
properly

None
  • Loading branch information
hsubra89 committed Sep 26, 2017
1 parent b4563ac commit 78b34c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/marbles/tokenParseReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const getMarbleTokenValue = <T>(
value: { [key: string]: T } | null,
materializeInnerObservables: boolean
) => {
const customValue = value && value[token] ? value[token] : token;
const customValue = value && typeof value[token] !== 'undefined' ? value[token] : token;

return materializeInnerObservables && customValue instanceof ColdObservable ? customValue.messages : customValue;
};
Expand Down

0 comments on commit 78b34c2

Please sign in to comment.