[magnolia-dev] [JIRA] (JSMODELS-6) Bad type when passing a returned js object to another js function
"JIRA (on behalf of Jaroslav Simak)" <jira-O8DnXSz/[email protected]>
| Newsgroups | gmane.comp.cms.magnolia.devel |
|---|---|
| Message-ID | <[email protected]> |
Jaroslav Simak updated an issue
Magnolia Javascript Models / https://jira.magnolia-cms.com/browse/JSMODELS-6 JSMODELS-6
Bad type when passing a returned js object to another js function
Change By:
Jaroslav Simak
If you pass returned javascript object (array, json) to the model, it's type gets changed and it does not behave as it should if you pass it again to another model function.
To reproduce:
# Return an JS array from a model function.
# Pass the returned array to another model function.
(Problem is not just with arrays though.)
Result:
* It cannot be iterated with for(var item in input) {
* It cannot be iterated with or for each (item in input){
* it does not have a length.
From Jaroslav:
It's something related to freemarker template object wrapping, so fixing it might be a little bit tricky.
https://jira.magnolia-cms.com/browse/JSMODELS-6#add-comment
Add Comment
This message was sent by Atlassian JIRA (v7.2.6#72008-sha1:26175bf)
----------
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
(unnamed)
(image/png, 425 B) - not displayed
(unnamed)
(image/png, 1.1 KB) - not displayed
(unnamed)
(image/png, 3.3 KB) - not displayed
(unnamed)
(image/png, 2.9 KB) - not displayed