What causes node to return 'navigator is not defined'

I am using npm package gallocation, but I also used logic like if (navigator.geolocation)

and I keep getting ReferenceError: nav not defined

As such?

var geo = function(){ //using Mr. Concolato example
   function geolocation(){
      if(geo.geolocation()){//blah
        navigator.geolocation.getCurrentPosition(coords)
        console.log(coords);
      }
   }
}

      

+3


source to share





All Articles