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