← back to 4square Admin
fix: revoke CSV blob object URL after download to prevent memory leak
d04b35d339b7b0a9c5e9b4d952b21efd421a66c1 · 2026-05-18 17:42:17 -0700 · Steve
Files touched
Diff
commit d04b35d339b7b0a9c5e9b4d952b21efd421a66c1
Author: Steve <steve@designerwallcoverings.com>
Date: Mon May 18 17:42:17 2026 -0700
fix: revoke CSV blob object URL after download to prevent memory leak
---
index.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 3f56ee4..f55ea3d 100644
--- a/index.html
+++ b/index.html
@@ -487,9 +487,11 @@ async function exportCSV() {
if (!r.ok) { toast('CSV export failed', 'err'); return; }
const blob = await r.blob();
const a = document.createElement('a');
- a.href = URL.createObjectURL(blob);
+ const objectUrl = URL.createObjectURL(blob);
+ a.href = objectUrl;
a.download = `4square-${CURRENT.kind}-${Date.now()}.csv`;
document.body.appendChild(a); a.click(); document.body.removeChild(a);
+ URL.revokeObjectURL(objectUrl);
toast(`Exported ${selected.size} row(s) as CSV`, 'ok');
}
← b358ef8 feat: bulk tag editor for wallco rows
·
back to 4square Admin
·
fix: handle fetch network failures in loadSources and loadPr 2c2f866 →