GavinJoyce / ember-headlessui

https://gavinjoyce.github.io/ember-headlessui/
Other
92 stars 34 forks source link

TypeError: can't convert value to string #167

Closed rreckonerr closed 2 years ago

rreckonerr commented 2 years ago

UPDATE

It appeared to be a simple naming collision! The as |t| and the t helper part. Took me a while to figure that out 🙈

<Transition @show={{true}} as |t|>
  <TestMe>{{t 'some.translation'}}</TestMe>
</Transition>

Original issue descrition When component with {{yield}} is wrapped in `Transition` and yields helper, e.g. {{t 'some.translation'}} ### This will throw ```js // test-me.hbs {{yield}} // application.hbs {{t 'some.translation'}} ``` ### These will not throw ```js // test-me.hbs {{yield}} // application.hbs {{this.someTranslation}} // application.js get someTranslation() { return this.intl.t('some.translation'); } ``` ```js // test-me.hbs {{yield}} // application.hbs Some content ```