We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f0e16b commit 47b33f2Copy full SHA for 47b33f2
app/components/artifact.tsx
@@ -37,10 +37,12 @@ export function HTMLPreview(props: {
37
const { id, height, title } = e.data;
38
setTitle(title);
39
if (id == frameId.current) {
40
- setIframeHeight(height);
+ if (height != iframeHeight + 40) {
41
+ setIframeHeight(height);
42
+ }
43
}
44
});
- }, []);
45
+ }, [iframeHeight]);
46
47
const height = useMemo(() => {
48
const parentHeight = props.height || 600;
0 commit comments