better-call 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/index.cjs +1 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/package.json +14 -13
package/dist/index.js
CHANGED
|
@@ -113,10 +113,7 @@ function toResponse(data, init) {
|
|
|
113
113
|
return toResponse(data.body, {
|
|
114
114
|
status: data.statusCode,
|
|
115
115
|
statusText: data.status.toString(),
|
|
116
|
-
headers:
|
|
117
|
-
...data.headers instanceof Headers ? Object.fromEntries(data.headers.entries()) : data?.headers,
|
|
118
|
-
...init?.headers instanceof Headers ? Object.fromEntries(init.headers.entries()) : init?.headers
|
|
119
|
-
}
|
|
116
|
+
headers: init?.headers || data.headers
|
|
120
117
|
});
|
|
121
118
|
}
|
|
122
119
|
let body = data;
|