Merge pull request #165 from matiangul/master

Fix is_empty method
This commit is contained in:
Dustin Moore
2013-05-14 08:42:10 -07:00
+9 -7
View File
@@ -1188,13 +1188,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;
};