File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export default function Page() {
164164 reset ( )
165165 if ( bioNode . current ) {
166166 console . log ( "resetting" )
167- bioNode . current . innerHTML = ""
167+ bioNode . current . innerText = ""
168168 }
169169 } ,
170170 onClose : ( ) => {
@@ -179,7 +179,7 @@ export default function Page() {
179179 ...prev . history ,
180180 {
181181 speaker : "bot" ,
182- text : bioNode . current ?. innerHTML . replace ( / < b r > / g, "\n" ) as string ,
182+ text : bioNode . current ?. innerText . replace ( / < b r > / g, "\n" ) as string ,
183183 } ,
184184 ] ,
185185 }
@@ -198,7 +198,7 @@ export default function Page() {
198198 }
199199 try {
200200 let text = JSON . parse ( data ) . choices [ 0 ] . text
201- bioNode . current . innerHTML = bioNode . current . innerHTML + text
201+ bioNode . current . innerText = bioNode . current . innerText + text
202202 } catch ( err ) {
203203 console . log ( `Failed to parse data: ${ data } ` )
204204 setError ( `Failed to parse the response` )
@@ -207,7 +207,7 @@ export default function Page() {
207207
208208 const onSubmit : SubmitHandler < FormData > = ( data ) => {
209209 if ( bioNode . current ) {
210- bioNode . current . innerHTML = "..."
210+ bioNode . current . innerText = "..."
211211 }
212212 setStreaming ( true )
213213
You can’t perform that action at this time.
0 commit comments