Skip to content

Fixed two regressions introduced in v6.3.0

Compare
Choose a tag to compare
@ijlee2 ijlee2 released this 04 Dec 14:47
· 45 commits to main since this release
b71c011

What changed?

Reverted the removal of the class property allowEmpty

If you happened to overwrite an ember-intl's helper so that, in your app, the helper allows "empty" values by default, then you may continue to use the following syntax:

/* my-addon/addon/helpers/t.ts */
import THelper from 'ember-intl/helpers/t';

export default class extends THelper {
  allowEmpty = true;
}

However, this (overwriting the addon, especially through inheritance) is not recommended, as implementation details can change in the future.

Note

Going forward, I'd like to see if all helpers can return an empty string when value is either undefined or null. You can visit #1813 and Discord thread to provide your feedback.

Allowed the intl service to handle removing event listeners

In addition to separating concerns better, the pull request fixes an error that you might have seen in your tests after installing ember-intl@6.3.0 or 6.3.1.

actual: >
  null
stack: >
  Error: Can not call `.lookup` after the owner has been destroyed
    at Container.lookup
    at Class.lookup
    at THelper.getInjection
    at untrack
    at ComputedProperty.get
    at THelper.getter [as intl]