@based/db 0.2.3 → 0.2.4

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.
Binary file
Binary file
@@ -40,6 +40,7 @@ export class BasedQueryResponse {
40
40
  debug(this.result, 0, this.end);
41
41
  return this;
42
42
  }
43
+ //
43
44
  node(index = 0) {
44
45
  // get id as well
45
46
  // and potentialy a proxy [i] as well
@@ -23,10 +23,12 @@ export const startUpdateHandler = (server) => {
23
23
  const id = readUint32(buffer, i);
24
24
  const subId = readUint32(buffer, i + 4);
25
25
  const subContainer = server.subscriptions.ids.get(subId);
26
- const ids = subContainer.ids.get(id);
27
- if (ids) {
28
- for (const fn of ids) {
29
- fn();
26
+ if (subContainer) {
27
+ const ids = subContainer.ids.get(id);
28
+ if (ids) {
29
+ for (const fn of ids) {
30
+ fn();
31
+ }
30
32
  }
31
33
  }
32
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@based/db",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "main": "./dist/src/index.js",
6
6
  "scripts": {