[magnolia-dev] [JIRA] (JSMODELS-6) Bad type when passing a returned js object to another js function
"JIRA (on behalf of Christopher Zimmermann)" <jira-O8DnXSz/[email protected]>
| Newsgroups | gmane.comp.cms.magnolia.devel |
|---|---|
| Message-ID | <[email protected]> |
Christopher Zimmermann created 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
Issue Type:
Bug
Assignee:
Jaroslav Simak
Created:
17/May/17 12:44 PM
Priority:
Neutral
Reporter:
Christopher Zimmermann
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.
Result:
- It cannot be iterated with for(var item in input) {
- It cannot be iterated with or 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/gif, 98 B) - not displayed
(unnamed)
(image/png, 1.1 KB) - not displayed
(unnamed)
(image/png, 2.9 KB) - not displayed