TextContentRendererMixin.js 393 B

12345678910111213141516
  1. export default {
  2. props: {
  3. response: {},
  4. },
  5. computed: {
  6. responseBodyText() {
  7. if (typeof this.response.body === "string") return this.response.body
  8. else {
  9. const res = new TextDecoder("utf-8").decode(this.response.body)
  10. // HACK: Temporary trailing null character issue from the extension fix
  11. return res.replace(/\0+$/, "")
  12. }
  13. },
  14. },
  15. }