From 871575607f82b21be50de33700697cd1444cea29 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 29 Sep 2015 09:44:03 -0600 Subject: [PATCH] Remove goog.isDefAndNotNull() from tileutfgridsource.js --- src/ol/source/tileutfgridsource.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ol/source/tileutfgridsource.js b/src/ol/source/tileutfgridsource.js index 76e59302fb..2d0715b6e7 100644 --- a/src/ol/source/tileutfgridsource.js +++ b/src/ol/source/tileutfgridsource.js @@ -268,8 +268,7 @@ ol.source.TileUTFGridTile_.prototype.getImage = function(opt_context) { * @return {Object} */ ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) { - if (goog.isNull(this.grid_) || goog.isNull(this.keys_) || - !goog.isDefAndNotNull(this.data_)) { + if (goog.isNull(this.grid_) || goog.isNull(this.keys_) || !this.data_) { return null; } var xRelative = (coordinate[0] - this.extent_[0]) / @@ -292,9 +291,7 @@ ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) { } code -= 32; - var key = this.keys_[code]; - - return goog.isDefAndNotNull(key) ? this.data_[key] : null; + return (code in this.keys_) ? this.data_[this.keys_[code]] : null; };