Remove goog.isNull in source classes

This commit is contained in:
Marc Jansen
2015-09-29 15:20:51 +02:00
parent 30e2f44825
commit e1f477ad8c
18 changed files with 51 additions and 55 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ ol.source.Image = function(options) {
*/
this.resolutions_ = options.resolutions !== undefined ?
options.resolutions : null;
goog.asserts.assert(goog.isNull(this.resolutions_) ||
goog.asserts.assert(!this.resolutions_ ||
goog.array.isSorted(this.resolutions_,
function(a, b) {
return b - a;
@@ -75,7 +75,7 @@ ol.source.Image.prototype.getResolutions = function() {
*/
ol.source.Image.prototype.findNearestResolution =
function(resolution) {
if (!goog.isNull(this.resolutions_)) {
if (this.resolutions_) {
var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
resolution = this.resolutions_[idx];
}