Skip to content
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 error message instructions #19950

Merged
merged 1 commit into from
Feb 10, 2022
Merged

Update error message instructions #19950

merged 1 commit into from
Feb 10, 2022

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Feb 9, 2022

Since Ember 3.25 it's unnecessary to pass a helper or modifier class to the corresponding template keyword before you can use them. They are first-class values that can be used directly.

This updates the error message to stop suggesting the now-unnecessary use of the helper and modifier keywords.

Before:

Assertion Failed: Passing a dynamic string to the (helper) keyword is disallowed. (You specified (helper s) and s evaluated into "my-helper".) This ensures we can statically analyze the template and determine which helpers are used. If the helper name is always the same, use a string literal instead, i.e. (helper "my-helper"). Otherwise, import the helpers into JavaScript and pass them to the helper keyword. See https://github.com/emberjs/rfcs/blob/master/text/0496-handlebars-strict-mode.md#4-no-dynamic-resolution for details. ('sample2/templates/application.hbs' @ L3:C9)

After:

Assertion Failed: Passing a dynamic string to the (helper) keyword is disallowed. (You specified (helper s) and s evaluated into "my-helper".) This ensures we can statically analyze the template and determine which helpers are used. If the helper name is always the same, use a string literal instead, i.e. (helper "my-helper"). Otherwise, import the helpers into JavaScript and pass them directly. See https://github.com/emberjs/rfcs/blob/master/text/0496-handlebars-strict-mode.md#4-no-dynamic-resolution for details. ('sample2/templates/application.hbs' @ L3:C9)

Since Ember 3.25 it's unnecessary to pass a helper or modifier class to the corresponding template keyword before you can use them. They are first-class values that can be used directly.

This updates the error message to stop suggesting the now-unnecessary use of the helper and modifier keywords.
@locks
Copy link
Contributor

locks commented Feb 10, 2022

:shipit: Thanks!

@locks locks merged commit d2251bf into master Feb 10, 2022
@locks locks deleted the improved-error-message branch February 10, 2022 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants