Remove goog.isDefAndNotNull() from tileutfgridsource.js
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user