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) {
3838 root,
3939 initialState,
4040 } = props ;
41- const [ container , setContainer ] = useState < HTMLDivElement > ( ) ;
41+ const [ container , setContainer ] = useState < HTMLDivElement | null > ( ) ;
4242 const [ view , setView ] = useState < EditorView > ( ) ;
4343 const [ state , setState ] = useState < EditorState > ( ) ;
4444 const defaultThemeOption = EditorView . theme ( {
@@ -114,7 +114,7 @@ export function useCodeMirror(props: UseCodeMirror) {
114114 } ;
115115 } , [ container , state ] ) ;
116116
117- useEffect ( ( ) => setContainer ( props . container ! ) , [ props . container ] ) ;
117+ useEffect ( ( ) => setContainer ( props . container ) , [ props . container ] ) ;
118118
119119 useEffect (
120120 ( ) => ( ) => {
You can’t perform that action at this time.
0 commit comments