File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 9
9
SlateSelectorContext ,
10
10
} from '../hooks/use-slate-selector'
11
11
import { EDITOR_TO_ON_CHANGE } from '../utils/weak-maps'
12
- import { IS_REACT_ABOVE_VERSION_17 } from '../utils/environment'
12
+ import { IS_REACT_VERSION_17_OR_ABOVE } from '../utils/environment'
13
13
import { useIsomorphicLayoutEffect } from '../hooks/use-isomorphic-layout-effect'
14
14
15
15
/**
@@ -71,7 +71,7 @@ export const Slate = (props: {
71
71
72
72
useIsomorphicLayoutEffect ( ( ) => {
73
73
const fn = ( ) => setIsFocused ( ReactEditor . isFocused ( editor ) )
74
- if ( IS_REACT_ABOVE_VERSION_17 ) {
74
+ if ( IS_REACT_VERSION_17_OR_ABOVE ) {
75
75
document . addEventListener ( 'focusin' , fn )
76
76
document . addEventListener ( 'focusout' , fn )
77
77
return ( ) => {
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
3
- export const IS_REACT_ABOVE_VERSION_17 =
3
+ export const IS_REACT_VERSION_17_OR_ABOVE =
4
4
parseInt ( React . version . split ( '.' ) [ 0 ] , 10 ) >= 17
5
5
6
6
export const IS_IOS =
You can’t perform that action at this time.
0 commit comments