mol_plot_all 1.2.1549 → 1.2.1551

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
@@ -847,7 +847,7 @@ var $;
847
847
  ;
848
848
  "use strict";
849
849
  var $;
850
- (function ($) {
850
+ (function ($_1) {
851
851
  $mol_test({
852
852
  'init with overload'() {
853
853
  class X extends $mol_object {
@@ -860,6 +860,13 @@ var $;
860
860
  });
861
861
  $mol_assert_equal(x.foo(), 2);
862
862
  },
863
+ 'Context in instance inherits from class'($) {
864
+ const custom = $.$mol_ambient({});
865
+ class X extends $.$mol_object {
866
+ static $ = custom;
867
+ }
868
+ $mol_assert_equal(new X().$, custom);
869
+ },
863
870
  });
864
871
  })($ || ($ = {}));
865
872