mol_view_tree2_lib 1.0.35 → 1.0.37
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 +14 -7
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +1 -1
- package/web.js.map +1 -1
- package/web.mjs +1 -1
- package/web.test.js +13 -6
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -199,7 +199,7 @@ var $;
|
|
|
199
199
|
if (this[$mol_ambient_ref])
|
|
200
200
|
return this[$mol_ambient_ref];
|
|
201
201
|
const owner = $mol_owning_get(this);
|
|
202
|
-
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
202
|
+
return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
|
|
203
203
|
}
|
|
204
204
|
set $(next) {
|
|
205
205
|
if (this[$mol_ambient_ref])
|
package/web.test.js
CHANGED
|
@@ -906,16 +906,16 @@ var $;
|
|
|
906
906
|
$mol_assert_unique([1], [2], [3]);
|
|
907
907
|
},
|
|
908
908
|
'two must be alike'() {
|
|
909
|
-
$
|
|
909
|
+
$mol_assert_equal([3], [3]);
|
|
910
910
|
},
|
|
911
911
|
'three must be alike'() {
|
|
912
|
-
$
|
|
912
|
+
$mol_assert_equal([3], [3], [3]);
|
|
913
913
|
},
|
|
914
914
|
'two object must be alike'() {
|
|
915
|
-
$
|
|
915
|
+
$mol_assert_equal({ a: 1 }, { a: 1 });
|
|
916
916
|
},
|
|
917
917
|
'three object must be alike'() {
|
|
918
|
-
$
|
|
918
|
+
$mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
|
|
919
919
|
},
|
|
920
920
|
});
|
|
921
921
|
})($ || ($ = {}));
|
|
@@ -2341,7 +2341,7 @@ var $;
|
|
|
2341
2341
|
;
|
|
2342
2342
|
"use strict";
|
|
2343
2343
|
var $;
|
|
2344
|
-
(function ($) {
|
|
2344
|
+
(function ($_1) {
|
|
2345
2345
|
$mol_test({
|
|
2346
2346
|
'init with overload'() {
|
|
2347
2347
|
class X extends $mol_object {
|
|
@@ -2354,6 +2354,13 @@ var $;
|
|
|
2354
2354
|
});
|
|
2355
2355
|
$mol_assert_equal(x.foo(), 2);
|
|
2356
2356
|
},
|
|
2357
|
+
'Context in instance inherits from class'($) {
|
|
2358
|
+
const custom = $.$mol_ambient({});
|
|
2359
|
+
class X extends $.$mol_object {
|
|
2360
|
+
static $ = custom;
|
|
2361
|
+
}
|
|
2362
|
+
$mol_assert_equal(new X().$, custom);
|
|
2363
|
+
},
|
|
2357
2364
|
});
|
|
2358
2365
|
})($ || ($ = {}));
|
|
2359
2366
|
|
|
@@ -2653,7 +2660,7 @@ var $;
|
|
|
2653
2660
|
}
|
|
2654
2661
|
await $mol_wire_async(A).a();
|
|
2655
2662
|
$mol_assert_equal(A.instances.length, 2);
|
|
2656
|
-
$mol_assert_equal(A.instances[0] instanceof A);
|
|
2663
|
+
$mol_assert_equal(A.instances[0] instanceof A, true);
|
|
2657
2664
|
$mol_assert_equal(A.instances[0], A.instances[1]);
|
|
2658
2665
|
}
|
|
2659
2666
|
});
|