Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handled problem with key callback returning 'undefined'

  • Loading branch information...
commit b3562688e69d06eabfe5b4331f3d2bddbbcb50c3 1 parent 8e9d39e
@RoyJacobs RoyJacobs authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  knockout.mapping.js
View
3  knockout.mapping.js
@@ -483,11 +483,10 @@
var unwrappedRootObject = ko.utils.unwrapObservable(rootObject);
var itemsByKey = {};
- var mappedItemsByKey = {};
var optimizedKeys = true;
for (i = 0, j = unwrappedRootObject.length; i < j; i++) {
var key = keyCallback(unwrappedRootObject[i]);
- if (key instanceof Object) {
+ if (key === undefined || key instanceof Object) {
optimizedKeys = false;
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.