mol_dump_lib 0.0.868 → 0.0.869

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/web.mjs CHANGED
@@ -449,7 +449,7 @@ var $;
449
449
  if (this[$mol_ambient_ref])
450
450
  return this[$mol_ambient_ref];
451
451
  const owner = $mol_owning_get(this);
452
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
452
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
453
453
  }
454
454
  set $(next) {
455
455
  if (this[$mol_ambient_ref])
package/web.test.js CHANGED
@@ -841,7 +841,7 @@ var $;
841
841
  ;
842
842
  "use strict";
843
843
  var $;
844
- (function ($) {
844
+ (function ($_1) {
845
845
  $mol_test({
846
846
  'init with overload'() {
847
847
  class X extends $mol_object {
@@ -854,6 +854,13 @@ var $;
854
854
  });
855
855
  $mol_assert_equal(x.foo(), 2);
856
856
  },
857
+ 'Context in instance inherits from class'($) {
858
+ const custom = $.$mol_ambient({});
859
+ class X extends $.$mol_object {
860
+ static $ = custom;
861
+ }
862
+ $mol_assert_equal(new X().$, custom);
863
+ },
857
864
  });
858
865
  })($ || ($ = {}));
859
866