You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method visitPropertiesOrArrayEntries is doing unnecessary iterations on updateViewModel because the wrong variable is being used to check against ignored properties.
#199
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.
In a data model that contains many nested collections, it's essential to avoid unnecessary recursions. We have been using "ignore" to prune any deep branches in our data model that could cause stack overflow during mapping. However the method visitPropertiesOrArrayEntries is incorrectly checking a property name against the ignore option, at a sub-collection level, so all our ignored properties are being visited by updateViewModel anyway.
Current line 443: if (ko.utils.arrayIndexOf(options.ignore, fullPropertyName) != -1) {
It should be: if (ko.utils.arrayIndexOf(options.ignore, indexer) != -1) {
And the same issue is with copy and observe.
The text was updated successfully, but these errors were encountered:
gracezlive
pushed a commit
to gracezlive/knockout.mapping
that referenced
this issue
Oct 22, 2014
In a data model that contains many nested collections, it's essential to avoid unnecessary recursions. We have been using "ignore" to prune any deep branches in our data model that could cause stack overflow during mapping. However the method visitPropertiesOrArrayEntries is incorrectly checking a property name against the ignore option, at a sub-collection level, so all our ignored properties are being visited by updateViewModel anyway.
Current line 443: if (ko.utils.arrayIndexOf(options.ignore, fullPropertyName) != -1) {
It should be: if (ko.utils.arrayIndexOf(options.ignore, indexer) != -1) {
And the same issue is with copy and observe.
The text was updated successfully, but these errors were encountered: