formacao
This commit is contained in:
+9
-8
@@ -1,4 +1,3 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
@@ -43,9 +42,8 @@ const Suspense = async ({
|
||||
const nonce = (0, import_context.useContext)(StreamingContext)?.scriptNonce;
|
||||
let resArray = [];
|
||||
const stackNode = { [import_constants.DOM_STASH]: [0, []] };
|
||||
const popNodeStack = (value) => {
|
||||
const popNodeStack = () => {
|
||||
import_render.buildDataStack.pop();
|
||||
return value;
|
||||
};
|
||||
try {
|
||||
stackNode[import_constants.DOM_STASH][0] = 0;
|
||||
@@ -55,12 +53,15 @@ const Suspense = async ({
|
||||
);
|
||||
} catch (e) {
|
||||
if (e instanceof Promise) {
|
||||
const resume = (0, import_context.captureRenderContext)();
|
||||
resArray = [
|
||||
e.then(() => {
|
||||
stackNode[import_constants.DOM_STASH][0] = 0;
|
||||
import_render.buildDataStack.push([[], stackNode]);
|
||||
return (0, import_components.childrenToString)(children).then(popNodeStack);
|
||||
})
|
||||
e.then(
|
||||
() => resume(() => {
|
||||
stackNode[import_constants.DOM_STASH][0] = 0;
|
||||
import_render.buildDataStack.push([[], stackNode]);
|
||||
return (0, import_components.childrenToString)(children).finally(popNodeStack);
|
||||
})
|
||||
)
|
||||
];
|
||||
} else {
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user