From 369290d90db71994abed0a064423e14fbe5326b1 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 9 Dec 2013 15:59:20 +0100 Subject: [PATCH] Firefox has a Object.prototype.watch method --- src/map/ext/Map.Geolocation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/ext/Map.Geolocation.js b/src/map/ext/Map.Geolocation.js index 0b135d5f..09d84cf0 100644 --- a/src/map/ext/Map.Geolocation.js +++ b/src/map/ext/Map.Geolocation.js @@ -27,7 +27,7 @@ L.Map.include({ var onResponse = L.bind(this._handleGeolocationResponse, this), onError = L.bind(this._handleGeolocationError, this); - if (options.watch) { + if (options.hasOwnProperty('watch') && options.watch) { this._locationWatchId = navigator.geolocation.watchPosition(onResponse, onError, options); } else {