braid-http 0.3.16 → 0.3.17
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 +5 -2
- package/package.json +1 -1
package/braid-http-client.js
CHANGED
|
@@ -377,7 +377,7 @@ var subscription_parser = (cb) => ({
|
|
|
377
377
|
|
|
378
378
|
// Maybe we parsed an update! That's cool!
|
|
379
379
|
if (this.state.result === 'success') {
|
|
380
|
-
|
|
380
|
+
var update = {
|
|
381
381
|
version: this.state.version,
|
|
382
382
|
parents: this.state.parents,
|
|
383
383
|
body: this.state.body,
|
|
@@ -385,7 +385,10 @@ var subscription_parser = (cb) => ({
|
|
|
385
385
|
|
|
386
386
|
// Output extra_headers if there are some
|
|
387
387
|
extra_headers: extra_headers(this.state.headers)
|
|
388
|
-
}
|
|
388
|
+
}
|
|
389
|
+
for (var k in update)
|
|
390
|
+
if (update[k] === undefined) delete update[k]
|
|
391
|
+
this.cb(update)
|
|
389
392
|
|
|
390
393
|
// Reset the parser for the next version!
|
|
391
394
|
this.state = {input: this.state.input}
|