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

null wrapped in a reactive.get #138

Open
cristiandouce opened this issue May 26, 2014 · 5 comments
Open

null wrapped in a reactive.get #138

cristiandouce opened this issue May 26, 2014 · 5 comments

Comments

@cristiandouce
Copy link
Member

A teamplate like this:

<code data-text="{JSON.stringify(this, null, 2)}"></code>

Leads to the following execution error:

@vendethiel
Copy link
Member

eval/new Function lead to new context like this one

@defunctzombie
Copy link
Contributor

Maybe null should be special cased. What I recommend in this case tho is to invoke a view function that returns a string formatted as you like.

@defunctzombie defunctzombie changed the title Odd error null being wrapped in a reactive.get Jun 2, 2014
@defunctzombie defunctzombie changed the title null being wrapped in a reactive.get null wrapped in a reactive.get Jun 2, 2014
@cristiandouce
Copy link
Member Author

The thing is I'm inside an each iteration on a model's sub-array of objects. When I try to invoke major's model function, I get undefined cannot be called as a function error, since in the scope, this reffers to the current object on the array...

@cristiandouce
Copy link
Member Author

Sorry my issue description didn't provide that info.

@defunctzombie
Copy link
Contributor

Maybe I don't understand the issue. Can you provide a failing example with the each issue and I can take a look.

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

3 participants