File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed 
fixtures/fizz-ssr-browser-streaming Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -99,22 +99,26 @@ <h1>Fizz Example</h1>
9999        let  decoder  =  new  TextDecoder ( ) ; 
100100        let  debugOutput  =  '' ; 
101101
102-         while  ( ! done )  { 
103-           const  chunk  =  await  reader . read ( ) ; 
104-           done  =  chunk . done ; 
102+         try  { 
103+           while  ( ! done )  { 
104+             const  chunk  =  await  reader . read ( ) ; 
105+             done  =  chunk . done ; 
105106
106-           let  output  =  decoder . decode ( chunk . value ) ; 
107-           iframe . contentWindow . document . write ( output ) ; 
108-           debugOutput  +=  output ; 
109-         } 
110- 
111-         iframe . contentWindow . document . close ( ) ; 
107+             let  output  =  decoder . decode ( chunk . value ) ; 
108+             iframe . contentWindow . document . write ( output ) ; 
109+             debugOutput  +=  output ; 
110+           } 
111+         }  catch  ( e )  { 
112+           // 
113+         }  finally  { 
114+           iframe . contentWindow . document . close ( ) ; 
112115
113-         console . log ( 
114-           `DEBUG OUTPUT:\n\n`  + 
115-           `👀 Notice the invalid HTML chunk '<div hidden id="<div' 👀 \n\n`  + 
116-           debugOutput 
117-         ) ; 
116+           console . log ( 
117+             `DEBUG OUTPUT:\n\n`  + 
118+             `👀 Notice the invalid HTML chunk '<div hidden id="<div' 👀 \n\n`  + 
119+             debugOutput 
120+           ) ; 
121+         } 
118122      } 
119123    </ script > 
120124  </ body > 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments