Added check for e.alpha
parent
7809c0a5ec
commit
81fd585e84
|
@ -5,7 +5,7 @@
|
||||||
window.addEventListener('deviceorientation', function(e){
|
window.addEventListener('deviceorientation', function(e){
|
||||||
|
|
||||||
// No orientation data
|
// No orientation data
|
||||||
if(!e) $('#no-dir').show()
|
if(!e||!e.alpha) $('#no-dir').show()
|
||||||
|
|
||||||
// Set orientation
|
// Set orientation
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue