diff options
author | Jimmy Wärting <jimmy@warting.se> | 2021-07-05 15:34:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 15:34:37 +0200 |
commit | 2c0b0e45b72ef1b5d7fa95e1e110d07ddbc720f7 (patch) | |
tree | 3b54a6f1f156f8d105cf41ac290035c8b5f8f1c9 /extensions/net/03_http.js | |
parent | ea87d860beda7cd40eb6857199a00e5ba8700fd2 (diff) |
refactor: asynchronous blob backing store (#10969)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'extensions/net/03_http.js')
-rw-r--r-- | extensions/net/03_http.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/net/03_http.js b/extensions/net/03_http.js index c83936cfe..343b305a6 100644 --- a/extensions/net/03_http.js +++ b/extensions/net/03_http.js @@ -140,7 +140,10 @@ if (innerResp.body !== null) { if (innerResp.body.unusable()) throw new TypeError("Body is unusable."); if (innerResp.body.streamOrStatic instanceof ReadableStream) { - if (innerResp.body.length === null) { + if ( + innerResp.body.length === null || + innerResp.body.source instanceof Blob + ) { respBody = innerResp.body.stream; } else { const reader = innerResp.body.stream.getReader(); |