@bbn/bbn 1.0.329 → 1.0.331

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.
@@ -63,7 +63,13 @@ export default function stream(url, success, data, failure, abort, finished) {
63
63
  // Do something with last chunk of data then exit reader
64
64
  _deleteLoader(requestId, data);
65
65
  if (json) {
66
- throw new Error('Stream ended with data: ' + json);
66
+ try {
67
+ success(JSON.parse(json));
68
+ json = '';
69
+ }
70
+ catch (e) {
71
+ throw new Error('Stream ended with data: ' + json);
72
+ }
67
73
  }
68
74
  if (finished) {
69
75
  finished();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.329",
3
+ "version": "1.0.331",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",