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.
@@ -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
- this.cb({
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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-http",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "An implementation of Braid-HTTP for Node.js and Browsers",
5
5
  "scripts": {
6
6
  "test": "node test/server.js"