Skip to content

Commit

Permalink
Added temporary fix for the trailing null character from extension
Browse files Browse the repository at this point in the history
requests
  • Loading branch information
AndrewBastin committed Sep 18, 2020
1 parent 9840ebf commit 4ea60d3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ export default {
computed: {
responseBodyText() {
if (typeof this.response.body === "string") return this.response.body
return new TextDecoder("utf-8").decode(this.response.body)
else {
const res = new TextDecoder("utf-8").decode(this.response.body)

// HACK: Temporary trailing null character issue from the extension fix
return res.replace(/\0+$/, "")
}
},
},
}

0 comments on commit 4ea60d3

Please sign in to comment.