@dabble/patches 0.4.8 → 0.4.9

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.
@@ -106,7 +106,7 @@ class Patches {
106
106
  await this.untrackDocs([docId]);
107
107
  }
108
108
  await this.store.deleteDoc(docId);
109
- this.onDeleteDoc.emit(docId);
109
+ await this.onDeleteDoc.emit(docId);
110
110
  }
111
111
  /**
112
112
  * Gets an open document instance by ID, if it exists.
@@ -25,7 +25,8 @@ class FetchTransport {
25
25
  this.headers = void 0;
26
26
  this.onMessage.emit(await response.text());
27
27
  } catch (error) {
28
- this.onMessage.emit(JSON.stringify(rpcError(-32e3, error.message)));
28
+ const message = JSON.parse(raw);
29
+ this.onMessage.emit(JSON.stringify(rpcError(-32e3, error.message, message.id)));
29
30
  }
30
31
  }
31
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dabble/patches",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "Immutable JSON Patch implementation based on RFC 6902 supporting operational transformation and last-writer-wins",
5
5
  "author": "Jacob Wright <jacwright@gmail.com>",
6
6
  "bugs": {