mol_jsx_lib 0.0.833 → 0.0.835
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.js +11 -9
- package/node.js.map +1 -1
- package/node.mjs +11 -9
- package/node.test.js +11 -9
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.js +11 -9
- package/web.js.map +1 -1
- package/web.mjs +11 -9
package/node.js
CHANGED
|
@@ -1624,16 +1624,13 @@ var $;
|
|
|
1624
1624
|
result = this.task.call(this.host, ...this.args);
|
|
1625
1625
|
break;
|
|
1626
1626
|
}
|
|
1627
|
-
if ($mol_promise_like(result)) {
|
|
1627
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1628
1628
|
const put = (res) => {
|
|
1629
1629
|
if (this.cache === result)
|
|
1630
1630
|
this.put(res);
|
|
1631
1631
|
return res;
|
|
1632
1632
|
};
|
|
1633
|
-
result =
|
|
1634
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1635
|
-
});
|
|
1636
|
-
handled.add(result);
|
|
1633
|
+
result = result.then(put, put);
|
|
1637
1634
|
}
|
|
1638
1635
|
}
|
|
1639
1636
|
catch (error) {
|
|
@@ -1644,15 +1641,20 @@ var $;
|
|
|
1644
1641
|
result = new Error(String(error), { cause: error });
|
|
1645
1642
|
}
|
|
1646
1643
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1647
|
-
result =
|
|
1644
|
+
result = result.finally(() => {
|
|
1648
1645
|
if (this.cache === result)
|
|
1649
1646
|
this.absorb();
|
|
1650
|
-
}), {
|
|
1651
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1652
1647
|
});
|
|
1653
|
-
handled.add(result);
|
|
1654
1648
|
}
|
|
1655
1649
|
}
|
|
1650
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1651
|
+
result = Object.assign(result, {
|
|
1652
|
+
destructor: result['destructor'] ?? (() => { })
|
|
1653
|
+
});
|
|
1654
|
+
handled.add(result);
|
|
1655
|
+
const error = new Error();
|
|
1656
|
+
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
1657
|
+
}
|
|
1656
1658
|
if (!$mol_promise_like(result)) {
|
|
1657
1659
|
this.track_cut();
|
|
1658
1660
|
}
|