@mulsense/xnew 0.7.1 → 0.7.3

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.
package/dist/xnew.d.ts CHANGED
@@ -271,6 +271,7 @@ declare const xnew: ((...args: UnitArgs) => Unit) & {
271
271
  [key: string]: any;
272
272
  };
273
273
  append(parent: Unit, ...args: UnitArgs): void;
274
+ next(unit: Unit, ...args: UnitArgs): void;
274
275
  context(key: any): any;
275
276
  promise(promise: Function | Promise<any> | Unit): UnitPromise;
276
277
  then(callback: Function): UnitPromise;
package/dist/xnew.js CHANGED
@@ -781,9 +781,9 @@
781
781
  }
782
782
  static getContext(unit, key) {
783
783
  for (let context = unit._.currentContext; context.previous !== null; context = context.previous) {
784
- if (context.value === Unit.currentUnit)
784
+ if (context.value === Unit.currentUnit && key === unit._.currentComponent)
785
785
  continue;
786
- if (context.key === key)
786
+ if (key === context.key)
787
787
  return context.value;
788
788
  }
789
789
  }
package/dist/xnew.mjs CHANGED
@@ -775,9 +775,9 @@ class Unit {
775
775
  }
776
776
  static getContext(unit, key) {
777
777
  for (let context = unit._.currentContext; context.previous !== null; context = context.previous) {
778
- if (context.value === Unit.currentUnit)
778
+ if (context.value === Unit.currentUnit && key === unit._.currentComponent)
779
779
  continue;
780
- if (context.key === key)
780
+ if (key === context.key)
781
781
  return context.value;
782
782
  }
783
783
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "Component-Oriented Programming"
6
6
  ],
7
- "version": "0.7.1",
7
+ "version": "0.7.3",
8
8
  "main": "dist/xnew.js",
9
9
  "module": "dist/xnew.mjs",
10
10
  "types": "dist/xnew.d.ts",