From ba657b14cde3eb2f94628b3c9070e43c43ebf0b1 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Wed, 6 Mar 2024 04:51:25 -0800 Subject: [PATCH] minimize diff --- src/client/stdlib/fileAttachment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/stdlib/fileAttachment.js b/src/client/stdlib/fileAttachment.js index 172567cc0..0bfd5a135 100644 --- a/src/client/stdlib/fileAttachment.js +++ b/src/client/stdlib/fileAttachment.js @@ -2,8 +2,8 @@ const files = new Map(); export function registerFile(name, file) { const url = new URL(name, location).href; - if (file == null) return void files.delete(url); - files.set(url, {url: new URL(file.path, location).href, mimeType: file.mimeType}); + if (file == null) files.delete(url); + else files.set(url, {url: new URL(file.path, location).href, mimeType: file.mimeType}); } export function FileAttachment(name, base = location.href) {