Skip to content

[Glimmer 2] Allow for null lookups on get to fail gracefully#13317

Merged
chancancode merged 2 commits intoemberjs:masterfrom
chadhietala:null-tests
Apr 13, 2016
Merged

[Glimmer 2] Allow for null lookups on get to fail gracefully#13317
chancancode merged 2 commits intoemberjs:masterfrom
chadhietala:null-tests

Conversation

@chadhietala
Copy link
Contributor

Fixes 3 failing tests under get helper in #13316

@chadhietala chadhietala changed the title [Glimmer 2] Allow for null looks on to fail gracefully [Glimmer 2] Allow for null lookups on to fail gracefully Apr 12, 2016
@chadhietala chadhietala changed the title [Glimmer 2] Allow for null lookups on to fail gracefully [Glimmer 2] Allow for null lookups on get to fail gracefully Apr 12, 2016
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #13296 and #13311. We should support {{get foo 1}} (iow, not just string keys).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize we are at the "leaf" of a chain here. In that case, we can just return null here. NULL_REFERENCE is just a POJO whose value and get is hardcoded to always return null.

@chancancode chancancode merged commit 8750fc2 into emberjs:master Apr 13, 2016
@chadhietala chadhietala deleted the null-tests branch May 6, 2016 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants