ismx-nexo-node-app 0.4.126 → 0.4.128

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.
@@ -38,7 +38,8 @@ class BusinessState {
38
38
  }
39
39
  notify(data) {
40
40
  var _a, _b;
41
- this.data = Object.assign(Object.assign({}, this.data), data);
41
+ if (data !== undefined)
42
+ this.data = data;
42
43
  for (let l in this.listeners)
43
44
  try {
44
45
  (_b = (_a = this.listeners)[l]) === null || _b === void 0 ? void 0 : _b.call(_a, this.data);
@@ -8,7 +8,7 @@ export default class BusinessState<Model> {
8
8
  observe(listener: (data: Model) => any, runOnObserve?: boolean): string;
9
9
  observeId(id: string, listener: (data: Model) => any, runOnObserve?: boolean): string;
10
10
  protected remove(id: string): void;
11
- protected notify(data?: Partial<Model>): void;
11
+ protected notify(data?: Model): void;
12
12
  protected clone(data: Model): Model;
13
13
  private reviver;
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.4.126",
3
+ "version": "0.4.128",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -24,8 +24,8 @@ export default class BusinessState<Model>
24
24
  delete this.listeners[id];
25
25
  }
26
26
 
27
- protected notify(data?: Partial<Model>): void {
28
- this.data = { ...this.data, ...data };
27
+ protected notify(data?: Model): void {
28
+ if (data !== undefined) this.data = data;
29
29
  for (let l in this.listeners)
30
30
  try { this.listeners[l]?.(this.data); } catch (error) {}
31
31
  }