Skip to content

Server-side support #55

@paulogr

Description

@paulogr

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions