This PR will add more guarding around the global.navigator.
When I was experimenting with the useNetworkStatus() hook inside Gatsby I was getting build errors due to the fact it was trying to access global.navigator which is not available when trying to server-side-render with Gatsby.
This PR will add more guarding around the global.navigator.
When I was experimenting with the
useNetworkStatus()
hook inside Gatsby I was getting build errors due to the fact it was trying to accessglobal.navigator
which is not available when trying to server-side-render with Gatsby.