Skip to content

Commit

Permalink
add delay to avoid 0-height renders
Browse files Browse the repository at this point in the history
  • Loading branch information
jaked committed Apr 11, 2024
1 parent 596ddec commit a0cbd75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vscode/src/vitaleRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ window.__vite_plugin_react_preamble_installed__ = true;
document.getElementsByTagName("base")[0].href = "http://localhost:5173/";
// without this delay, sometimes the output cell height is set to 0
await new Promise((resolve) => setTimeout(resolve, 50));
import("http://localhost:5173/${id}&t=${Date.now()}");
`;
element.appendChild(script);
Expand Down

0 comments on commit a0cbd75

Please sign in to comment.