This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Description
When running in a desktop browser, the Device Motion Plugin crashes with the following error :
ionic.bundle.js:25642 TypeError: Cannot read property 'watchAcceleration' of undefined
at Object.watchAcceleration (lib/ngCordova/dist/ng-cordova.js:1910:46)
The error happens when there is no accelerometer support on the testing device.
This is due to an unhandled q.reject promise return at the stated line.
Not a major bug (as supposedly people will use this plugin on accelerometer-enabled devices) but still getting in my way through the debugging process; I'm submitting a pull request.