mol_db 0.0.1584 → 0.0.1586
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.deps.json +1 -1
- package/node.js +1 -1
- package/node.js.map +1 -1
- package/node.mjs +1 -1
- package/node.test.js +9 -2
- package/node.test.js.map +1 -1
- package/package.json +1 -1
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])
|
|
@@ -2974,7 +2974,7 @@ var $;
|
|
|
2974
2974
|
;
|
|
2975
2975
|
"use strict";
|
|
2976
2976
|
var $;
|
|
2977
|
-
(function ($) {
|
|
2977
|
+
(function ($_1) {
|
|
2978
2978
|
$mol_test({
|
|
2979
2979
|
'init with overload'() {
|
|
2980
2980
|
class X extends $mol_object {
|
|
@@ -2987,6 +2987,13 @@ var $;
|
|
|
2987
2987
|
});
|
|
2988
2988
|
$mol_assert_equal(x.foo(), 2);
|
|
2989
2989
|
},
|
|
2990
|
+
'Context in instance inherits from class'($) {
|
|
2991
|
+
const custom = $.$mol_ambient({});
|
|
2992
|
+
class X extends $.$mol_object {
|
|
2993
|
+
static $ = custom;
|
|
2994
|
+
}
|
|
2995
|
+
$mol_assert_equal(new X().$, custom);
|
|
2996
|
+
},
|
|
2990
2997
|
});
|
|
2991
2998
|
})($ || ($ = {}));
|
|
2992
2999
|
|