Stronger type checking to continue only if data is defined

This commit is contained in:
Petr Sloup
2015-04-14 14:15:47 +02:00
parent 12022122a6
commit f1f0b37bdc
+1 -1
View File
@@ -271,7 +271,7 @@ ol.source.TileUTFGridTile_.prototype.getImage = function(opt_context) {
*/ */
ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) { ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) {
if (goog.isNull(this.grid_) || goog.isNull(this.keys_) || if (goog.isNull(this.grid_) || goog.isNull(this.keys_) ||
goog.isNull(this.data_)) { !goog.isDefAndNotNull(this.data_)) {
return null; return null;
} }
var xRelative = (coordinate[0] - this.extent_[0]) / var xRelative = (coordinate[0] - this.extent_[0]) /