Skip to content

Commit f05920f

Browse files
committed
fix: download button no longer causes runtime error
1 parent 2a21985 commit f05920f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/Preview.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export const Preview: FC = () => {
5555
const link = document.createElement("a");
5656
link.href = url;
5757
link.download = "output.json";
58-
document.appendChild(link);
58+
document.body.appendChild(link);
5959
link.click();
60-
document.removeChild(link);
60+
document.body.removeChild(link);
6161

6262
// Give the click event enough time to fire and then revoke the URL.
6363
// This method of doing it doesn't seem great but I'm not sure if there is a
@@ -393,9 +393,6 @@ const Debugger: FC<DebuggerProps> = ({ output }) => {
393393
src={output ?? {}}
394394
collapsed={1}
395395
theme={appliedTheme === "dark" ? "brewer" : "rjv-default"}
396-
style={{
397-
background: "inherit",
398-
}}
399396
/>
400397
</div>
401398
</ResizablePanel>
@@ -488,9 +485,9 @@ const Log: FC<LogProps> = ({ log }) => {
488485
className="fixed top-0 right-0 z-20 flex h-full w-full max-w-md flex-col justify-start gap-6 border-l bg-surface-primary p-4"
489486
>
490487
<div className="flex items-center justify-between">
491-
<p className="font-semibold text-2xl text-content-primary">
488+
<Dialog.Title className="font-semibold text-2xl text-content-primary">
492489
Log
493-
</p>
490+
</Dialog.Title>
494491
<Dialog.Close asChild={true}>
495492
<Button
496493
variant="outline"

0 commit comments

Comments
 (0)