cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [3/3] cordova-plugin-geolocation git commit: Expect lastPosition to have a timestamp that is already in msecs (DOMTimeStamp)
Date Wed, 28 Oct 2015 00:34:02 GMT
Expect lastPosition to have a timestamp that is already in msecs (DOMTimeStamp)


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/bf8a3734
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/bf8a3734
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/bf8a3734

Branch: refs/heads/master
Commit: bf8a373418f3056da93c85f957d91197f51db18a
Parents: 163051a
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Oct 27 17:28:50 2015 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Oct 27 17:28:50 2015 -0700

----------------------------------------------------------------------
 www/geolocation.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/bf8a3734/www/geolocation.js
----------------------------------------------------------------------
diff --git a/www/geolocation.js b/www/geolocation.js
index 6873ce9..f1f6445 100644
--- a/www/geolocation.js
+++ b/www/geolocation.js
@@ -118,7 +118,7 @@ var geolocation = {
 
         // Check our cached position, if its timestamp difference with current time is less
than the maximumAge, then just
         // fire the success callback with the cached position.
-        if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime()
- geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) {
+        if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime()
- geolocation.lastPosition.timestamp) <= options.maximumAge)) {
             successCallback(geolocation.lastPosition);
         // If the cached position check failed and the timeout was set to 0, error out with
a TIMEOUT error object.
         } else if (options.timeout === 0) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message