Skip to content

Conversation

@JakeChampion
Copy link
Owner

Fixes #801

@JakeChampion JakeChampion merged commit 37b55c2 into master Jul 31, 2020
@JakeChampion JakeChampion deleted the arraybuffer branch July 31, 2020 00:45
Copy link

@freund17 freund17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the code base, but maybe it is a better idea to convert the view to a buffer, where it is set instead of where it is used.

Because there might be other places where code is expecting an ArrayBuffer instead of a view.

this.arrayBuffer = function() {
if (this._bodyArrayBuffer) {
return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
consumed(this)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consumed returns either undefined or a rejected Promise.

The previous code returned the rejected Promise.
This changes the original behaviour.
Was that intended?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants