Added temporary fix for the trailing null character from extension

requests
This commit is contained in:
Andrew Bastin
2020-09-17 21:36:36 -04:00
parent 9840ebfe33
commit 4ea60d3431

View File

@@ -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+$/, "")
}
},
},
}