You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mu...@apache.org on 2015/05/06 21:21:45 UTC

cordova-plugin-device-motion git commit: CB-8926: The tests module tries to access an undefined global 'Accelerometer' on fail callbacks. This results in another JS error, "ReferenceError: 'Accelerometer' is undefined." This change passes through the e

Repository: cordova-plugin-device-motion
Updated Branches:
  refs/heads/master dddf7e921 -> 6f8e92ee3


CB-8926: The tests module tries to access an undefined global
'Accelerometer' on fail callbacks.  This results in another JS error,
"ReferenceError: 'Accelerometer' is undefined."  This change passes
through the error message instead of attempting to index into it.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/commit/6f8e92ee
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/tree/6f8e92ee
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/diff/6f8e92ee

Branch: refs/heads/master
Commit: 6f8e92ee3b71c6489563d3fd2ab2e4da5636bf85
Parents: dddf7e9
Author: Rob Paveza <Ro...@microsoft.com>
Authored: Tue Apr 28 12:25:54 2015 -0700
Committer: Rob Paveza <Ro...@microsoft.com>
Committed: Tue Apr 28 12:25:54 2015 -0700

----------------------------------------------------------------------
 tests/tests.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/6f8e92ee/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 0fd6877..136b473 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -263,7 +263,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         var fail = function (e) {
             console.log("watchAccel fail callback with error code " + e);
             stopAccel();
-            setAccelStatus(Accelerometer.ERROR_MSG[e]);
+            setAccelStatus(e);
         };
 
         // Update acceleration every 1 sec
@@ -306,7 +306,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         // Fail callback
         var fail = function (e) {
             console.log("getAccel fail callback with error code " + e);
-            setAccelStatus(Accelerometer.ERROR_MSG[e]);
+            setAccelStatus(e);
         };
 
         // Make call


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