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}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
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_) || !this.data_) {
|
||||||
!goog.isDefAndNotNull(this.data_)) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
var xRelative = (coordinate[0] - this.extent_[0]) /
|
var xRelative = (coordinate[0] - this.extent_[0]) /
|
||||||
@@ -292,9 +291,7 @@ ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) {
|
|||||||
}
|
}
|
||||||
code -= 32;
|
code -= 32;
|
||||||
|
|
||||||
var key = this.keys_[code];
|
return (code in this.keys_) ? this.data_[this.keys_[code]] : null;
|
||||||
|
|
||||||
return goog.isDefAndNotNull(key) ? this.data_[key] : null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user