File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/LiveComponent/assets/src/Component Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -308,12 +308,11 @@ export default class Component {
308
308
309
309
const headers = backendResponse . response . headers ;
310
310
if ( headers . get ( 'X-Live-Download' ) ) {
311
+ const headerContentDisposition = headers . get ( 'Content-Disposition' ) ;
311
312
if (
312
- ! (
313
- headers . get ( 'Content-Disposition' ) ?. includes ( 'attachment' ) ||
314
- headers . get ( 'Content-Disposition' ) ?. includes ( 'inline' )
315
- ) ||
316
- ! headers . get ( 'Content-Disposition' ) ?. includes ( 'filename=' )
313
+ ! headerContentDisposition
314
+ || ! ( headerContentDisposition ?. includes ( 'attachment' ) || headerContentDisposition ?. includes ( 'inline' ) )
315
+ || ! headerContentDisposition ?. includes ( 'filename=' )
317
316
) {
318
317
throw new Error ( 'Invalid LiveDownload response' ) ;
319
318
}
You can’t perform that action at this time.
0 commit comments