-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compact object #72
Compact object #72
Conversation
typeOf, | ||
A: emberArray | ||
} = Ember; | ||
const keys = Object.keys || Ember.keys; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can kill Ember.keys
, that is deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is; but doesn't 1.13 still support IE 8, which needs the Ember.keys polyfill?
d2533b3
to
c84fd7f
Compare
^^ Did a bit of refactoring per your recommendations and got rid of that superfluous observer. |
☔ The latest upstream changes (presumably #74) made this pull request unmergeable. Please resolve the merge conflicts. |
c84fd7f
to
2db2cb6
Compare
I rebased this as it got a bit stagnant. If y'all have any other feedback, let me know. |
If you rebase this against master, |
2db2cb6
to
10da1db
Compare
} = Ember; | ||
const keys = Object.keys || Ember.keys; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not needed, just use Object.keys
.
☔ The latest upstream changes (presumably #122) made this pull request unmergeable. Please resolve the merge conflicts. |
JSCS Errors Fixes error on Ember 1.13 Use isPresent one liner guard for non-arrays Guard before setting the array support object compacting update readme guard for non-array/non-object values don't use array computed be explicit about not supporting changing keys don't use @each remove unnecessary observer use ember libs
10da1db
to
85d7888
Compare
Sorry I hadn't touched this in a while — must have missed that comment from 15 days ago. |
Let's make this happen :) |
Or: | ||
|
||
```hbs | ||
{{#each-in (compacy objectWithBlanks) as |notBlankKey notBlankValue|}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/compacy/compact/
☔ The latest upstream changes (presumably 4e9995f) made this pull request unmergeable. Please resolve the merge conflicts. |
We're not going to merge this, as compact cannot track object properties being added/removed, so it would lead to weird stuff happening updating the object after the helper has run once. |
This adds support to #64 for compacting objects.
FYI: Tests are failing on Beta/Canary due to this bug: emberjs/ember.js#12995