diff --git a/direction.js b/direction.js index d55ba75..f84035e 100644 --- a/direction.js +++ b/direction.js @@ -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 {