braid-http 1.0.1 → 1.0.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.
- package/braid-http-client.js +4 -2
- package/package.json +1 -1
package/braid-http-client.js
CHANGED
|
@@ -234,8 +234,10 @@ async function braid_fetch (url, params = {}) {
|
|
|
234
234
|
|
|
235
235
|
// If parents is a function,
|
|
236
236
|
// call it now to get the latest parents
|
|
237
|
-
if (typeof params.parents === 'function')
|
|
238
|
-
|
|
237
|
+
if (typeof params.parents === 'function') {
|
|
238
|
+
let parents = params.parents()
|
|
239
|
+
if (parents) params.headers.set('parents', parents.map(JSON.stringify).join(', '))
|
|
240
|
+
}
|
|
239
241
|
|
|
240
242
|
// undocumented feature used by braid-chrome
|
|
241
243
|
// to see the fetch args as they are right before it is actually called,
|