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

[Bug] (modifier) does not accept values #19870

Open
NullVoxPopuli opened this issue Dec 5, 2021 · 2 comments
Open

[Bug] (modifier) does not accept values #19870

NullVoxPopuli opened this issue Dec 5, 2021 · 2 comments

Comments

@NullVoxPopuli
Copy link
Sponsor Contributor

🐞 Describe the Bug

Probably related to : #19869

but (helper aHelper) and (component aComponent) work for currying values, but (modifier) only takes strings.

(modifier) should take values for pairity with helper and component.

🔬 Minimal Reproduction

https://github.com/NullVoxPopuli/curried-things-test

😕 Actual Behavior

An error occurs

🤔 Expected Behavior

A curried modifier is returned

🌍 Environment

  • Ember: - ~3.28.0
  • Node.js/npm: - n/a
  • OS: - n/a
  • Browser: - n/a

➕ Additional Context

Add any other context about the problem here.

@Windvis
Copy link
Contributor

Windvis commented Feb 15, 2022

I gave your reproduction a try and I think the problem is that a plain function is used as the modifier value which won't work without your default modifier manager RFC. If you wrap that function in the ember-could-get-used-to-this`s modifier function it works as expected.

In fact, Ember already warns you about this with an error in the console:

Uncaught Error: Expected a dynamic modifier definition, but received an object or function that did not have a modifier manager associated with it. The dynamic invocation was `{{@myModifier}}`, and the incorrect definition is the value at the path `@myModifier`, which was: (unknown function)

@NullVoxPopuli
Copy link
Sponsor Contributor Author

I'll have to try this again with https://github.com/NullVoxPopuli/ember-functions-as-modifiers-polyfill

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

No branches or pull requests

2 participants