-
Notifications
You must be signed in to change notification settings - Fork 56
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
Update to 3.12 #202
Update to 3.12 #202
Conversation
addon/services/router-scroll.js
Outdated
set(this, 'key', stateUuid); | ||
const key = getWithDefault(this, 'key', '-1'); | ||
|
||
return getWithDefault(scrollMap, key, scrollMap.default); |
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.
Maybe don't use getWithDefault
? It only defaults if the value of the key is undefined
, but if it's null
then the default value won't be used.
https://github.com/emberjs/ember.js/blob/master/packages/%40ember/-internals/metal/lib/property_get.ts#L192
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.
Ah right. Great point. Just saw an RFC to deprecate as well. It is confusing!
No description provided.