Skip to content

Commit 805a78f

Browse files
aadesh18N2D4
andauthored
Apply suggestion from @N2D4
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
1 parent 3dac1cd commit 805a78f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/dashboard/src/components/commands/create-dashboard/dashboard-sandbox-host.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ function getSandboxDocument(artifact: DashboardArtifact, baseUrl: string): strin
332332
}
333333
334334
// AI-generated code will be inserted here
335-
${sourceCode}
335+
(() => {
336+
${sourceCode}
337+
})();
336338
337339
// Boot the dashboard
338340
const rootElement = document.getElementById('root');

0 commit comments

Comments
 (0)