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

Translations With Bound Parameters Display [object Object] #1

Closed
heathharrelson opened this issue Jan 29, 2015 · 0 comments · Fixed by #2
Closed

Translations With Bound Parameters Display [object Object] #1

heathharrelson opened this issue Jan 29, 2015 · 0 comments · Fixed by #2
Assignees

Comments

@heathharrelson
Copy link
Member

When bound parameters are passed into the t Handlebars helper, the output is [object Object]. For instance, in a test like the following where testarg is __count__ frogs in the 'en' locale and model.count is 1000

{{t "testarg" count=model.count}}

the browser displays [object Object] instead of the expected '1000 frogs'.

The browser may be displaying the result of calling toString on the stream returned from the helper, rather than the stream's value. Debugging code shows that the stream's value function is never called.

Changing the helper to unbound allows it to display '1000 frogs', but as expected the count does not update when the model is changed.

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 a pull request may close this issue.

1 participant