From aac30e3b16dd6ab73700277edd18b11a6fe5873a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Garci=CC=81a=20Iglesias?= Date: Thu, 22 Nov 2018 12:47:42 -0300 Subject: [PATCH] Fix 'cannot get property filter of undefined' error --- src/angular-sortable-view.js | 1 + 1 file changed, 1 insertion(+) 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){