Skip to content

Commit e21a7b2

Browse files
committed
promise reject the brandcheck
1 parent 390b963 commit e21a7b2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/web/fetch/body.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,11 @@ function mixinBody (prototype, getInternalState) {
438438
* @param {(target: any) => any} getInternalState
439439
*/
440440
function consumeBody (object, convertBytesToJSValue, instance, getInternalState) {
441-
webidl.brandCheck(object, instance)
441+
try {
442+
webidl.brandCheck(object, instance)
443+
} catch (e) {
444+
return Promise.reject(e)
445+
}
442446

443447
const state = getInternalState(object)
444448

0 commit comments

Comments
 (0)