File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export function useCodeMirror(props: UseCodeMirror) {
38
38
root,
39
39
initialState,
40
40
} = props ;
41
- const [ container , setContainer ] = useState < HTMLDivElement > ( ) ;
41
+ const [ container , setContainer ] = useState < HTMLDivElement | null > ( ) ;
42
42
const [ view , setView ] = useState < EditorView > ( ) ;
43
43
const [ state , setState ] = useState < EditorState > ( ) ;
44
44
const defaultThemeOption = EditorView . theme ( {
@@ -114,7 +114,7 @@ export function useCodeMirror(props: UseCodeMirror) {
114
114
} ;
115
115
} , [ container , state ] ) ;
116
116
117
- useEffect ( ( ) => setContainer ( props . container ! ) , [ props . container ] ) ;
117
+ useEffect ( ( ) => setContainer ( props . container ) , [ props . container ] ) ;
118
118
119
119
useEffect (
120
120
( ) => ( ) => {
You can’t perform that action at this time.
0 commit comments