You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/03/03 20:33:07 UTC
[1/10] git commit: check native responses are undefined rather than
truthy as 0 is an acceptable native response
Updated Branches:
refs/heads/master 616d37552 -> 4ca5fde64
check native responses are undefined rather than truthy as 0 is an acceptable native response
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/4ca5fde6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/4ca5fde6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/4ca5fde6
Branch: refs/heads/master
Commit: 4ca5fde64c8e6ed2cf0d99bb9b122fa6fc6c8e1b
Parents: 4268cde
Author: Fil Maj <ma...@gmail.com>
Authored: Sat Mar 3 11:27:46 2012 -0800
Committer: Fil Maj <ma...@gmail.com>
Committed: Sat Mar 3 11:27:46 2012 -0800
----------------------------------------------------------------------
lib/plugin/CompassHeading.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/4ca5fde6/lib/plugin/CompassHeading.js
----------------------------------------------------------------------
diff --git a/lib/plugin/CompassHeading.js b/lib/plugin/CompassHeading.js
index f9fe5e7..c1ab1a3 100644
--- a/lib/plugin/CompassHeading.js
+++ b/lib/plugin/CompassHeading.js
@@ -1,8 +1,8 @@
var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
- this.magneticHeading = magneticHeading || null;
- this.trueHeading = trueHeading || null;
- this.headingAccuracy = headingAccuracy || null;
- this.timestamp = (timestamp ? new Date(timestamp) : new Date());
+ this.magneticHeading = magneticHeading !== undefined ? magneticHeading : null;
+ this.trueHeading = trueHeading !== undefined ? trueHeading : null;
+ this.headingAccuracy = headingAccuracy !== undefined ? headingAccuracy : null;
+ this.timestamp = timestamp !== undefined ? new Date(timestamp) : new Date();
};
module.exports = CompassHeading;