Hello!
This function brakes on server side because obviously navigator api isn't part of the NodeJS, but given the name of the function isGeolocationSupported isn't supposed to verify exactly this ?
|
static isGeolocationSupported() { |
My proposal is to check the type of navigator keyworkd before use it like bellow:
return typeof navigator != 'undefined' && ('geolocation' in navigator);
That way the function will return false and won't break anymore :)
What do you think about?
Thanks
Hello!
This function brakes on server side because obviously
navigatorapi isn't part of the NodeJS, but given the name of the functionisGeolocationSupportedisn't supposed to verify exactly this ?geolocator/src/core/geolocator.js
Line 1783 in 728785d
My proposal is to check the type of navigator keyworkd before use it like bellow:
return typeof navigator != 'undefined' && ('geolocation' in navigator);That way the function will return
falseand won't break anymore :)What do you think about?
Thanks