Skip to content

Commit

Permalink
[grid] Checking in browser name is present
Browse files Browse the repository at this point in the history
Fixes #10907
  • Loading branch information
diemol committed Oct 18, 2022
1 parent ce1b3b1 commit 41f815c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions javascript/grid-ui/src/util/browser-logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import safariTechnologyPreviewLogo
import unknownBrowserLogo from '../assets/browsers/unknown.svg'

const browserLogo = (browser: string): string => {
if (browser.length === 0) {
const browserName = browser ?? ''
if (browserName.length === 0) {
return unknownBrowserLogo
}

switch (browser.toLowerCase()) {
switch (browserName.toLowerCase()) {
case 'chrome':
return chromeLogo
case 'microsoftedge':
Expand Down

0 comments on commit 41f815c

Please sign in to comment.