File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1528,11 +1528,12 @@ export default class ApiRequest extends LitElement {
1528
1528
respHeadersObj [ hdr ] = hdrVal ;
1529
1529
this . responseHeaders = `${ this . responseHeaders } ${ hdr } : ${ hdrVal } \n` ;
1530
1530
} ) ;
1531
- const contentType = fetchResponse . headers . get ( 'content-type' ) . split ( ';' ) [ 0 ] . trim ( ) ;
1531
+ let contentType = fetchResponse . headers . get ( 'content-type' ) ;
1532
1532
const respEmpty = ( await fetchResponse . clone ( ) . text ( ) ) . length === 0 ;
1533
1533
if ( respEmpty ) {
1534
1534
this . responseText = '' ;
1535
1535
} else if ( contentType ) {
1536
+ contentType = contentType . split ( ';' ) [ 0 ] . trim ( ) ;
1536
1537
if ( contentType === 'application/x-ndjson' ) {
1537
1538
this . responseText = await fetchResponse . text ( ) ;
1538
1539
} else if ( contentType . includes ( 'json' ) ) {
You can’t perform that action at this time.
0 commit comments