Skip to content

Commit

Permalink
fix(core): fix navigator check for strange environments (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and RobertCraigie committed Aug 23, 2023
1 parent 7c229a2 commit c783604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ declare const navigator: { userAgent: string } | undefined;

// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
function getBrowserInfo(): BrowserInfo | null {
if (!navigator || typeof navigator === 'undefined') {
if (typeof navigator === 'undefined' || !navigator) {
return null;
}

Expand Down

0 comments on commit c783604

Please sign in to comment.