mol_jsx_lib 0.0.1445 → 0.0.1447

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/node.mjs CHANGED
@@ -372,7 +372,7 @@ var $;
372
372
  if (this[$mol_ambient_ref])
373
373
  return this[$mol_ambient_ref];
374
374
  const owner = $mol_owning_get(this);
375
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
375
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
376
376
  }
377
377
  set $(next) {
378
378
  if (this[$mol_ambient_ref])
package/node.test.js CHANGED
@@ -363,7 +363,7 @@ var $;
363
363
  if (this[$mol_ambient_ref])
364
364
  return this[$mol_ambient_ref];
365
365
  const owner = $mol_owning_get(this);
366
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
366
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
367
367
  }
368
368
  set $(next) {
369
369
  if (this[$mol_ambient_ref])
@@ -3870,7 +3870,7 @@ var $;
3870
3870
  ;
3871
3871
  "use strict";
3872
3872
  var $;
3873
- (function ($) {
3873
+ (function ($_1) {
3874
3874
  $mol_test({
3875
3875
  'init with overload'() {
3876
3876
  class X extends $mol_object {
@@ -3883,6 +3883,13 @@ var $;
3883
3883
  });
3884
3884
  $mol_assert_equal(x.foo(), 2);
3885
3885
  },
3886
+ 'Context in instance inherits from class'($) {
3887
+ const custom = $.$mol_ambient({});
3888
+ class X extends $.$mol_object {
3889
+ static $ = custom;
3890
+ }
3891
+ $mol_assert_equal(new X().$, custom);
3892
+ },
3886
3893
  });
3887
3894
  })($ || ($ = {}));
3888
3895