MCPcopy Create free account
hub / github.com/ccj-007/easy-lowcode / xt

Function xt

renderer/index.js:1437–1487  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1435 }
1436 var We = 0, tt = !1;
1437 function xt(e) {
1438 {
1439 var r = We;
1440 We++, N.current === null && (N.current = []);
1441 var a = N.isBatchingLegacy, o;
1442 try {
1443 if (N.isBatchingLegacy = !0, o = e(), !a && N.didScheduleLegacyUpdate) {
1444 var i = N.current;
1445 i !== null && (N.didScheduleLegacyUpdate = !1, Ir(i));
1446 }
1447 } catch (F) {
1448 throw dr(r), F;
1449 } finally {
1450 N.isBatchingLegacy = a;
1451 }
1452 if (o !== null && typeof o == "object" && typeof o.then == "function") {
1453 var y = o, f = !1, m = {
1454 then: function(F, L) {
1455 f = !0, y.then(function(U) {
1456 dr(r), We === 0 ? xr(U, F, L) : F(U);
1457 }, function(U) {
1458 dr(r), L(U);
1459 });
1460 }
1461 };
1462 return !tt && typeof Promise < "u" && Promise.resolve().then(function() {
1463 }).then(function() {
1464 f || (tt = !0, l("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
1465 }), m;
1466 } else {
1467 var R = o;
1468 if (dr(r), We === 0) {
1469 var P = N.current;
1470 P !== null && (Ir(P), N.current = null);
1471 var A = {
1472 then: function(F, L) {
1473 N.current === null ? (N.current = [], xr(R, F, L)) : F(R);
1474 }
1475 };
1476 return A;
1477 } else {
1478 var D = {
1479 then: function(F, L) {
1480 F(R);
1481 }
1482 };
1483 return D;
1484 }
1485 }
1486 }
1487 }
1488 function dr(e) {
1489 e !== We - 1 && l("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), We = e;
1490 }

Callers

nothing calls this directly

Calls 4

IrFunction · 0.85
drFunction · 0.85
xrFunction · 0.85
lFunction · 0.70

Tested by

no test coverage detected