From fca830007ac13f6d320dc3fda6bfb877c4cc79b7 Mon Sep 17 00:00:00 2001 From: matiangul Date: Sat, 4 May 2013 11:05:00 +0200 Subject: [PATCH] Fixed is_empty method --- src/jquery.gridster.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index 62373af77..d08c4ac59 100644 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -1183,13 +1183,15 @@ * @return {Boolean} Returns true or false. */ fn.is_empty = function(col, row) { - if (typeof this.gridmap[col] !== 'undefined' && - typeof this.gridmap[col][row] !== 'undefined' && - this.gridmap[col][row] === false - ) { - return true; - } - return false; + if (typeof this.gridmap[col] !== 'undefined') { + if(typeof this.gridmap[col][row] !== 'undefined' && + this.gridmap[col][row] === false + ) { + return true; + } + return false; + } + return true; };