Fixed is_empty method

This commit is contained in:
matiangul
2013-05-04 11:05:00 +02:00
parent 4c9d502cbe
commit fca830007a
+9 -7
View File
@@ -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;
};