prevent error when cancelling prompt

This commit is contained in:
Theis Pieter Hollebeek 2025-10-11 23:03:28 +02:00
parent 43133d67e9
commit cc71c91bd7

View File

@ -124,6 +124,7 @@ runButton.onclick = () => {
function downloadFile(content, extension, mime) {
const filename = prompt("Filename?");
if (filename === null) return;
const blob = new Blob([content], { type: mime });
const url = URL.createObjectURL(blob);