mol_jsx_lib 0.0.832 → 0.0.834
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 -11
- package/node.js.map +1 -1
- package/node.mjs +11 -11
- package/node.test.js +11 -11
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.js +11 -11
- package/web.js.map +1 -1
- package/web.mjs +11 -11
package/node.js
CHANGED
|
@@ -1624,17 +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
|
-
Error.captureStackTrace(result);
|
|
1637
|
-
handled.add(result);
|
|
1633
|
+
result = result.then(put, put);
|
|
1638
1634
|
}
|
|
1639
1635
|
}
|
|
1640
1636
|
catch (error) {
|
|
@@ -1645,16 +1641,20 @@ var $;
|
|
|
1645
1641
|
result = new Error(String(error), { cause: error });
|
|
1646
1642
|
}
|
|
1647
1643
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1648
|
-
result =
|
|
1644
|
+
result = result.finally(() => {
|
|
1649
1645
|
if (this.cache === result)
|
|
1650
1646
|
this.absorb();
|
|
1651
|
-
}), {
|
|
1652
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1653
1647
|
});
|
|
1654
|
-
Error.captureStackTrace(result);
|
|
1655
|
-
handled.add(result);
|
|
1656
1648
|
}
|
|
1657
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
|
+
}
|
|
1658
1658
|
if (!$mol_promise_like(result)) {
|
|
1659
1659
|
this.track_cut();
|
|
1660
1660
|
}
|