diff --git a/src/angular-sortable-view.js b/src/angular-sortable-view.js index 76e08bc..554cbbb 100644 --- a/src/angular-sortable-view.js +++ b/src/angular-sortable-view.js @@ -88,6 +88,7 @@ return getSortableElements(mapKey); }, function(collection){ isGrid = false; + if (!collection) return; var array = collection.filter(function(item){ return !item.container; }).map(function(item){