File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -357,11 +357,22 @@ hterr_grabber.TracingListener.prototype = {
357357 return ;
358358 if ( code >= 600 )
359359 return ;
360- let mime = channel . contentType ;
361- let cType = mime . substring ( 0 , mime . indexOf ( '/' ) ) ;
362- let cEnc = mime . substring ( mime . indexOf ( '/' ) + 1 ) ;
363- if ( ! ( cType === 'text' || ( cType === 'application' && ( cEnc . includes ( 'html' ) || cEnc . includes ( 'xml' ) ) ) || mime === 'image/svg+xml' ) )
364- return ;
360+ let mime = false ;
361+ try
362+ {
363+ mime = channel . contentType ;
364+ }
365+ catch ( ex )
366+ {
367+ mime = false ;
368+ }
369+ if ( ! ! mime )
370+ {
371+ let cType = mime . substring ( 0 , mime . indexOf ( '/' ) ) ;
372+ let cEnc = mime . substring ( mime . indexOf ( '/' ) + 1 ) ;
373+ if ( ! ( cType === 'text' || ( cType === 'application' && ( cEnc . includes ( 'html' ) || cEnc . includes ( 'xml' ) ) ) || mime === 'image/svg+xml' ) )
374+ return ;
375+ }
365376 let extraParam = null ;
366377 try
367378 {
You can’t perform that action at this time.
0 commit comments