mol_wire_lib 1.0.1582 → 1.0.1584

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
@@ -647,7 +647,7 @@ var $;
647
647
  if (this[$mol_ambient_ref])
648
648
  return this[$mol_ambient_ref];
649
649
  const owner = $mol_owning_get(this);
650
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
650
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
651
651
  }
652
652
  set $(next) {
653
653
  if (this[$mol_ambient_ref])
package/web.test.js CHANGED
@@ -2181,7 +2181,7 @@ var $;
2181
2181
  ;
2182
2182
  "use strict";
2183
2183
  var $;
2184
- (function ($) {
2184
+ (function ($_1) {
2185
2185
  $mol_test({
2186
2186
  'init with overload'() {
2187
2187
  class X extends $mol_object {
@@ -2194,6 +2194,13 @@ var $;
2194
2194
  });
2195
2195
  $mol_assert_equal(x.foo(), 2);
2196
2196
  },
2197
+ 'Context in instance inherits from class'($) {
2198
+ const custom = $.$mol_ambient({});
2199
+ class X extends $.$mol_object {
2200
+ static $ = custom;
2201
+ }
2202
+ $mol_assert_equal(new X().$, custom);
2203
+ },
2197
2204
  });
2198
2205
  })($ || ($ = {}));
2199
2206