Skip to content

Commit

Permalink
Prevent undefined browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Sep 25, 2023
1 parent 3906bbf commit eb36507
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ interface BrowserExtensionBannerProps {

export function BrowserExtensionBanner({ parser = new UAParser() }: BrowserExtensionBannerProps) {
const browserName = parser.getBrowser().name?.toLowerCase();
if (!browserName) {
return null;
}

const browserOption = installationOptions[browserName];
if (!browserOption) {
return null;
Expand Down

0 comments on commit eb36507

Please sign in to comment.