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

Calling method within Twig file with two parameters results in a compiled twig template calling with four parameters #31

Open
dane-harnett opened this issue Oct 29, 2013 · 0 comments

Comments

@dane-harnett
Copy link

I am passing an object into my template like such

var obj = { value: 'a', doStuff: function(param1, param2) { ...}};

Twig.render(myTemplate.twig, {
data: obj
});

{{ data.doStuff('a', 'b') }}

when doing this, the compiled template ends up calling doStuff() with four params like this: [0, 'a', 1, 'b']

Causing the function to fail as the parameters are not as expected.

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

1 participant