Remove goog.isDefAndNotNull() from tileutfgridsource.js

This commit is contained in:
Tim Schaub
2015-09-29 09:44:03 -06:00
parent 5acf9023d0
commit 871575607f

View File

@@ -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;
};