Skip to content

Commit

Permalink
fix browserkind
Browse files Browse the repository at this point in the history
  • Loading branch information
xnerhu committed Dec 10, 2023
1 parent b360d56 commit d11635c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ export function getBrowserKind(): BrowserKind {
const userAgent = navigator.userAgent?.toLowerCase()
if (strIncludes(userAgent, 'edg/')) {
return BrowserKind.Edge
} else if (strIncludes(userAgent, 'safari')) {
return BrowserKind.Safari
} else if (strIncludes(userAgent, 'trident') || strIncludes(userAgent, 'msie')) {
return BrowserKind.IE
} else if (strIncludes(userAgent, 'wechat')) {
Expand All @@ -66,6 +64,8 @@ export function getBrowserKind(): BrowserKind {
return BrowserKind.Opera
} else if (strIncludes(userAgent, 'chrome')) {
return BrowserKind.Chrome
} else if (strIncludes(userAgent, 'safari')) {
return BrowserKind.Safari
} else {
return BrowserKind.Unknown
}
Expand Down

0 comments on commit d11635c

Please sign in to comment.