Skip to content

Commit

Permalink
revert back edge browserk ind
Browse files Browse the repository at this point in the history
  • Loading branch information
xnerhu committed Nov 5, 2023
1 parent d2dbee0 commit 02bd5b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,4 @@ export const enum BrowserKind {
Safari = 'safari',
IE = 'internet_explorer',
WeChat = 'wechat',
Edge = 'edge',
}
4 changes: 1 addition & 3 deletions src/utils/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ export function getBrowserEngineKind(): BrowserEngineKind {

export function getBrowserKind(): BrowserKind {
const userAgent = navigator.userAgent?.toLowerCase()
if (strIncludes(userAgent, 'edg/')) {
return BrowserKind.Edge
} else if (strIncludes(userAgent, 'safari')) {
if (strIncludes(userAgent, 'safari')) {
return BrowserKind.Safari
} else if (strIncludes(userAgent, 'trident') || strIncludes(userAgent, 'msie')) {
return BrowserKind.IE
Expand Down

0 comments on commit 02bd5b6

Please sign in to comment.