ember-polyfills / ember-modifier-manager-polyfill

Polyfill element modifiers for Ember 2.12 through 3.7
MIT License
10 stars 4 forks source link

`createModifier` should be result returned from `factoryFor` API #6

Closed spencer516 closed 5 years ago

spencer516 commented 5 years ago

Hiya!

I'm experimenting with some modifier stuff and it looks like it's handling the createModifier hook differently than specified in the RFC (and in Ember 3.8).

From the RFC:

The first argument passed to createModifier is the result returned from the factoryFor API. It contains a class property, which gives you the the raw class (the default export from app/modifiers/foo.js)

However, this polyfill is passing the .class property itself here.

I'll open a PR to address shortly.