Skip to content

Commit f6fcdcf

Browse files
committed
fixes #1039 - default response header to blank if missing
1 parent 15700c7 commit f6fcdcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/api-request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ export default class ApiRequest extends LitElement {
15731573
}
15741574
}
15751575
if (this.responseIsBlob) {
1576-
const contentDisposition = fetchResponse.headers.get('content-disposition');
1576+
const contentDisposition = fetchResponse.headers.get('content-disposition') || '';
15771577
let filenameFromContentDeposition = 'filename';
15781578
const filenameStarRegexMatch = contentDisposition.match(/filename\*=\s*UTF-8''([^;]+)/); // Support Headers like >>> Content-Disposition: attachment; filename*=UTF-8''example%20file.pdf
15791579
if (filenameStarRegexMatch) {

0 commit comments

Comments
 (0)