mol_tree2 1.0.650 → 1.0.652
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.test.js +11 -11
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +11 -11
- package/web.test.js.map +1 -1
package/package.json
CHANGED
package/web.test.js
CHANGED
|
@@ -2418,17 +2418,13 @@ var $;
|
|
|
2418
2418
|
result = this.task.call(this.host, ...this.args);
|
|
2419
2419
|
break;
|
|
2420
2420
|
}
|
|
2421
|
-
if ($mol_promise_like(result)) {
|
|
2421
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
2422
2422
|
const put = (res) => {
|
|
2423
2423
|
if (this.cache === result)
|
|
2424
2424
|
this.put(res);
|
|
2425
2425
|
return res;
|
|
2426
2426
|
};
|
|
2427
|
-
result =
|
|
2428
|
-
destructor: result['destructor'] ?? (() => { })
|
|
2429
|
-
});
|
|
2430
|
-
Error.captureStackTrace(result);
|
|
2431
|
-
handled.add(result);
|
|
2427
|
+
result = result.then(put, put);
|
|
2432
2428
|
}
|
|
2433
2429
|
}
|
|
2434
2430
|
catch (error) {
|
|
@@ -2439,16 +2435,20 @@ var $;
|
|
|
2439
2435
|
result = new Error(String(error), { cause: error });
|
|
2440
2436
|
}
|
|
2441
2437
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
2442
|
-
result =
|
|
2438
|
+
result = result.finally(() => {
|
|
2443
2439
|
if (this.cache === result)
|
|
2444
2440
|
this.absorb();
|
|
2445
|
-
}), {
|
|
2446
|
-
destructor: result['destructor'] ?? (() => { })
|
|
2447
2441
|
});
|
|
2448
|
-
Error.captureStackTrace(result);
|
|
2449
|
-
handled.add(result);
|
|
2450
2442
|
}
|
|
2451
2443
|
}
|
|
2444
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
2445
|
+
result = Object.assign(result, {
|
|
2446
|
+
destructor: result['destructor'] ?? (() => { })
|
|
2447
|
+
});
|
|
2448
|
+
handled.add(result);
|
|
2449
|
+
const error = new Error();
|
|
2450
|
+
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
2451
|
+
}
|
|
2452
2452
|
if (!$mol_promise_like(result)) {
|
|
2453
2453
|
this.track_cut();
|
|
2454
2454
|
}
|