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

[5/10] git commit: checking for definition of frequency as well

checking for definition of frequency as well


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/f5b600ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/f5b600ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/f5b600ae

Branch: refs/heads/master
Commit: f5b600ae0dd8cbd3b168fff0a72e92ad532dbb02
Parents: 4c30a3a
Author: Fil Maj <ma...@gmail.com>
Authored: Fri Mar 2 16:02:57 2012 -0800
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri Mar 2 16:03:22 2012 -0800

----------------------------------------------------------------------
 lib/plugin/accelerometer.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/f5b600ae/lib/plugin/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/plugin/accelerometer.js b/lib/plugin/accelerometer.js
index 895aef8..6725aae 100644
--- a/lib/plugin/accelerometer.js
+++ b/lib/plugin/accelerometer.js
@@ -45,7 +45,7 @@ var accelerometer = {
     watchAcceleration: function(successCallback, errorCallback, options) {
 
         // Default interval (10 sec)
-        var frequency = (options !== undefined)? options.frequency : 10000;
+        var frequency = (options !== undefined && options.frequency !== undefined)? options.frequency : 10000;
 
         // successCallback required
         if (typeof successCallback !== "function") {