braid-http 0.1.1 → 0.1.2

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.
@@ -140,10 +140,12 @@ if (is_nodejs) {
140
140
  }
141
141
 
142
142
  async function braid_fetch (url, params = {}) {
143
+ params = {...params} // Copy params, because we'll mutate it
144
+
143
145
  // Initialize the headers object
144
146
  if (!params.headers)
145
147
  params.headers = new Headers()
146
- if (!(params.headers instanceof Headers))
148
+ else
147
149
  params.headers = new Headers(params.headers)
148
150
 
149
151
  // Always set the peer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"