From 9a9b7fca9c1ac79316f3a9448d294612eb85ddc1 Mon Sep 17 00:00:00 2001 From: Michael Irwin Date: Sun, 29 Jul 2012 13:50:01 +0200 Subject: [PATCH] Don't assume sort data is present --- jquery.isotope.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jquery.isotope.js b/jquery.isotope.js index fcf66a8..9e5f8c5 100644 --- a/jquery.isotope.js +++ b/jquery.isotope.js @@ -578,7 +578,9 @@ }, _getSorter : function( elem, sortBy ) { - return $.data( elem, 'isotope-sort-data' )[ sortBy ]; + if ($.data( elem, 'isotope-sort-data' )) { + return $.data( elem, 'isotope-sort-data' )[ sortBy ]; + } }, // ====================== Layout Helpers ======================