From 4048784eaf77b35cda3845b08f38ecb0005b87ef Mon Sep 17 00:00:00 2001 From: vieron Date: Mon, 30 Jul 2012 21:17:03 +0200 Subject: [PATCH] Forcing conversion to arrays before calling Math.max --- src/jquery.gridster.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index 3967412f6..625d74bd5 100644 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -2145,12 +2145,14 @@ var actual_cols = this.$widgets.map(function() { return $(this).attr('data-col'); }); + actual_cols = Array.prototype.slice.call(actual_cols, 0); //needed to pass tests with phantomjs actual_cols.length || (actual_cols = [0]); var actual_rows = this.$widgets.map(function() { return $(this).attr('data-row'); }); + actual_rows = Array.prototype.slice.call(actual_rows, 0); //needed to pass tests with phantomjs actual_rows.length || (actual_rows = [0]);