-
Notifications
You must be signed in to change notification settings - Fork 167
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
allowEmpty
class property not respected in v6.3.1
#1813
Comments
@IgnaceMaes Thanks for reporting a case that I didn't account for in In I think how you overrode the Because there's another regression from import THelper from 'ember-intl/helpers/t';
export default class extends THelper {
allowEmpty = true;
} Going forward, what we could try is to make all helpers not throw an error when the value provided is either /* In v6.3.1 */
compute([value]) {
if (isEmpty(value)) {
if (options?.allowEmpty ?? this.allowEmpty) {
return '';
}
throw new Error('...');
}
// ...
} with, /* At a later point */
compute([value]) {
if (value === undefined || value === null) {
return '';
}
// ...
} Removing |
Environment
Steps to Reproduce
{{t this.somethingUndefined}}
with a custom T helper as documented here: https://ember-intl.github.io/ember-intl/docs/guide/testing#guarding-against-errors
Results in
Error: {{t}} helper requires a value.
. Inember-intl@6.2.2
this worked fine.As a workaround, I found this works:
The text was updated successfully, but these errors were encountered: