张延森 3 vuotta sitten
vanhempi
commit
c64c88b056
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      src/components/rich-editor/index.jsx

+ 2
- 2
src/components/rich-editor/index.jsx Näytä tiedosto

26
 
26
 
27
   useEffect(() => {
27
   useEffect(() => {
28
     if (editorRef.current && !initedRef.current) {
28
     if (editorRef.current && !initedRef.current) {
29
-      if (props.initd) {
29
+      if (props.inited) {
30
         initedRef.current = true
30
         initedRef.current = true
31
         editorRef.current.setContent(props.value)
31
         editorRef.current.setContent(props.value)
32
       }
32
       }
33
     }
33
     }
34
-  }, [props.value, props.initd])
34
+  }, [props.value, props.inited])
35
 
35
 
36
   return (
36
   return (
37
     <textarea id={id} />
37
     <textarea id={id} />