File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2049,13 +2049,14 @@ class Component {
2049
2049
this . valueStore . flushDirtyPropsToPending ( ) ;
2050
2050
this . isRequestPending = false ;
2051
2051
this . backendRequest . promise . then ( async ( response ) => {
2052
+ var _a ;
2052
2053
const backendResponse = new BackendResponse ( response ) ;
2053
2054
const html = await backendResponse . getBody ( ) ;
2054
2055
for ( const input of Object . values ( this . pendingFiles ) ) {
2055
2056
input . value = '' ;
2056
2057
}
2057
2058
const headers = backendResponse . response . headers ;
2058
- if ( headers . get ( 'Content-Type' ) !== 'application/vnd.live-component+html' && ! headers . get ( 'X-Live-Redirect' ) ) {
2059
+ if ( ! ( ( _a = headers . get ( 'Content-Type' ) ) === null || _a === void 0 ? void 0 : _a . includes ( 'application/vnd.live-component+html' ) ) && ! headers . get ( 'X-Live-Redirect' ) ) {
2059
2060
const controls = { displayError : true } ;
2060
2061
this . valueStore . pushPendingPropsBackToDirty ( ) ;
2061
2062
this . hooks . triggerHook ( 'response:error' , backendResponse , controls ) ;
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ export default class Component {
296
296
297
297
// if the response does not contain a component, render as an error
298
298
const headers = backendResponse . response . headers ;
299
- if ( headers . get ( 'Content-Type' ) !== 'application/vnd.live-component+html' && ! headers . get ( 'X-Live-Redirect' ) ) {
299
+ if ( ! headers . get ( 'Content-Type' ) ?. includes ( 'application/vnd.live-component+html' ) && ! headers . get ( 'X-Live-Redirect' ) ) {
300
300
const controls = { displayError : true } ;
301
301
this . valueStore . pushPendingPropsBackToDirty ( ) ;
302
302
this . hooks . triggerHook ( 'response:error' , backendResponse , controls ) ;
You can’t perform that action at this time.
0 commit comments