Skip to content

Commit

Permalink
fix: call to the toString method when Response receives a String obje…
Browse files Browse the repository at this point in the history
…ct (#239)
  • Loading branch information
Angelmmiguel authored Oct 18, 2023
1 parent 6755075 commit f40e7da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kits/javascript/shims/types/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import httpStatus from "http-status";
// It contains different helpers
class Response {
constructor(body, options = {}) {
this.body = body;
// Process the body
if (body instanceof String) {
this.body = body.toString();
} else {
this.body = body;
}

if (options.headers instanceof Headers) {
this.headers = options.headers;
Expand Down
Binary file modified kits/javascript/wasm-workers-quick-js-engine.wasm
Binary file not shown.

0 comments on commit f40e7da

Please sign in to comment.