diff options
author | 2021-11-22 22:19:53 -0500 | |
---|---|---|
committer | 2021-11-22 22:19:53 -0500 | |
commit | 1d01ffeb9e3fa90b009afe08a43b34843856c074 (patch) | |
tree | 062610de822ca6baff15b8e8437fbc6570a23bc8 /packages/bun-framework-next | |
parent | 25a49005cc4e8ec46323c2edb5bc2826117c5266 (diff) | |
download | bun-1d01ffeb9e3fa90b009afe08a43b34843856c074.tar.gz bun-1d01ffeb9e3fa90b009afe08a43b34843856c074.tar.zst bun-1d01ffeb9e3fa90b009afe08a43b34843856c074.zip |
remove .then
Diffstat (limited to '')
-rw-r--r-- | packages/bun-framework-next/renderDocument.tsx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/packages/bun-framework-next/renderDocument.tsx b/packages/bun-framework-next/renderDocument.tsx index 4832c9eb2..218d21a3c 100644 --- a/packages/bun-framework-next/renderDocument.tsx +++ b/packages/bun-framework-next/renderDocument.tsx @@ -654,12 +654,7 @@ export async function render({ ): RenderPageResult | Promise<RenderPageResult> => { if (ctx.err && ErrorDebug) { const htmlOrPromise = renderToString(<ErrorDebug error={ctx.err} />); - return typeof htmlOrPromise === "string" - ? { html: htmlOrPromise, head } - : htmlOrPromise.then((html) => ({ - html, - head, - })); + return { html: htmlOrPromise, head }; } if (dev && (props.router || props.Component)) { @@ -683,12 +678,8 @@ export async function render({ /> </AppContainer> ); - return typeof htmlOrPromise === "string" - ? { html: htmlOrPromise, head } - : htmlOrPromise.then((html) => ({ - html, - head, - })); + + return { html: htmlOrPromise, head }; }; const documentCtx = { ...ctx, renderPage }; |