From e65384a407b7538770e641f47402b4b8cff759cb Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Tue, 29 Sep 2015 15:22:26 +0200 Subject: [PATCH] Remove goog.isNull in deviceorientation class --- src/ol/deviceorientation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/deviceorientation.js b/src/ol/deviceorientation.js index 4c1397f7d1..ac08dbd56c 100644 --- a/src/ol/deviceorientation.js +++ b/src/ol/deviceorientation.js @@ -208,10 +208,10 @@ ol.DeviceOrientation.prototype.getTracking = function() { ol.DeviceOrientation.prototype.handleTrackingChanged_ = function() { if (ol.has.DEVICE_ORIENTATION) { var tracking = this.getTracking(); - if (tracking && goog.isNull(this.listenerKey_)) { + if (tracking && !this.listenerKey_) { this.listenerKey_ = goog.events.listen(goog.global, 'deviceorientation', this.orientationChange_, false, this); - } else if (!tracking && !goog.isNull(this.listenerKey_)) { + } else if (!tracking && this.listenerKey_) { goog.events.unlistenByKey(this.listenerKey_); this.listenerKey_ = null; }