Closed sandydoo closed 3 years ago
Looks like an intermittent failure on the ember-release scenario, might just be able to re-run for it to succeed
Glad to see this merged :) Thanks! Could we release a new version having this PR in it ?
I'm getting ready for a 2.0.0 release but I will cut a 1.9.1 to backfill this deprecation fix
Starting with Ember v3.21,
getWithDefault
is deprecated and will be removed in v4.0.https://emberjs.github.io/rfcs/0554-deprecate-getwithdefault.html
This PR adds the function as a utility, complete with tests.
I intentionally avoided the nullish operator
??
as it isn't available, based on the project's eslint config.I did, however, add an explicit check fornull
. Ember's default implementation does not do this, but it seems appropriate to add given the issues brought up in the RFC and provides a direct upgrade path to using??
withoutget
. I've checked all the usages ofgetWithDefault
and believe this change shouldn't cause any unexpected issues.