Inline goog.isDef() calls for properties

This commit is contained in:
Tim Schaub
2015-09-27 10:40:20 -06:00
parent 36e336f406
commit 83c59ee255
44 changed files with 200 additions and 198 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ ol.Geolocation = function(opt_options) {
this.setTrackingOptions(options.trackingOptions);
}
this.setTracking(goog.isDef(options.tracking) ? options.tracking : false);
this.setTracking(options.tracking !== undefined ? options.tracking : false);
};
goog.inherits(ol.Geolocation, ol.Object);
@@ -139,7 +139,7 @@ ol.Geolocation.prototype.handleTrackingChanged_ = function() {
goog.bind(this.positionChange_, this),
goog.bind(this.positionError_, this),
this.getTrackingOptions());
} else if (!tracking && goog.isDef(this.watchId_)) {
} else if (!tracking && this.watchId_ !== undefined) {
goog.global.navigator.geolocation.clearWatch(this.watchId_);
this.watchId_ = undefined;
}