Skip to content

Commit

Permalink
fix chrome and edge three digit version check ianstormtaylor#4869
Browse files Browse the repository at this point in the history
  • Loading branch information
always-maap committed Mar 11, 2022
1 parent 2a620dc commit 837e05f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/slate-react/src/utils/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const IS_SAFARI =
// "modern" Edge was released at 79.x
export const IS_EDGE_LEGACY =
typeof navigator !== 'undefined' &&
/Edge?\/(?:[0-6][0-9]|[0-7][0-8])/i.test(navigator.userAgent)
/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(\.)/i.test(navigator.userAgent)

export const IS_CHROME =
typeof navigator !== 'undefined' && /Chrome/i.test(navigator.userAgent)
Expand All @@ -30,7 +30,7 @@ export const IS_CHROME =
// and older, Chrome 76+ can use `beforeInput` though.
export const IS_CHROME_LEGACY =
typeof navigator !== 'undefined' &&
/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])/i.test(navigator.userAgent)
/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(\.)/i.test(navigator.userAgent)

// Firefox did not support `beforeInput` until `v87`.
export const IS_FIREFOX_LEGACY =
Expand Down

0 comments on commit 837e05f

Please sign in to comment.