Skip to content

Commit

Permalink
chore: simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
Cahllagerfeld committed May 7, 2024
1 parent d8aafc6 commit a4a6477
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/artifacts/HtmlVisualization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function HTMLVisualization({ content }: Props) {
const handleIframeLoad = () => {
if (iframeRef.current) {
const contentHeight = iframeRef.current.contentWindow?.document.documentElement.scrollHeight;
iframeRef.current.style.height = contentHeight ? `${contentHeight}px` : "100%";
iframeRef.current.height = contentHeight ? `${contentHeight}px` : "100%";
}
};

Expand Down

0 comments on commit a4a6477

Please sign in to comment.