Skip to content

Commit

Permalink
Update src/plugin.js
Browse files Browse the repository at this point in the history
Co-authored-by: Gary Katsevman <[email protected]>
  • Loading branch information
kevleyski and gkatsev authored Dec 20, 2022
1 parent 7bf68a5 commit 1cc47ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,8 @@ void main() {

// For iOS we need permission for the device orientation data, this will pop up an 'Allow'
// eslint-disable-next-line
if (typeof(window.DeviceMotionEvent) === 'function' && typeof(window.DeviceMotionEvent.requestPermission) === "function") {
if (typeof window.DeviceMotionEvent === 'function' &&
typeof window.DeviceMotionEvent.requestPermission === "function") {
const self = this;

window.DeviceMotionEvent.requestPermission().then(response => {
Expand Down

0 comments on commit 1cc47ef

Please sign in to comment.