Permalink
Browse files

check if change includes a collection before trying to refresh the co…

…llection
  • Loading branch information...
mmckegg committed Mar 25, 2013
1 parent 093cbda commit fd1ebfc878f6837bd1bae70fb415c9b1933ed34c
Showing with 6 additions and 4 deletions.
  1. +6 −4 browser/bind_dom.js
View
@@ -27,10 +27,12 @@ module.exports = function(view, datasource, options){
checkNodePosition(object, changeInfo)
}
if (changeInfo.action === 'update'){
- refreshNodes(changeInfo.collection.$elements)
-
- checkNodeCollection(object, changeInfo)
- checkNodePosition(object, changeInfo)
+
+ if (changeInfo.collection){
+ refreshNodes(changeInfo.collection.$elements)
+ checkNodeCollection(object, changeInfo)
+ checkNodePosition(object, changeInfo)
+ }
refreshNodes(findElementsInObject(object), {ignoreAppendFor: changeInfo.addedItems})

0 comments on commit fd1ebfc

Please sign in to comment.