From a0c6f80f76d60bc2bb36942d4162b90e6b5aa2a2 Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 11 Aug 2024 14:05:15 +0200 Subject: dom: remove generic JS bindings Dispatch manually with fromJS instead. --- src/utils/mimeguess.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/utils/mimeguess.nim') diff --git a/src/utils/mimeguess.nim b/src/utils/mimeguess.nim index f13eaf89..d6224303 100644 --- a/src/utils/mimeguess.nim +++ b/src/utils/mimeguess.nim @@ -19,8 +19,7 @@ func guessContentType*(mimeTypes: MimeTypes; path: string; break if n > 0: let ext = path.substr(n + 1) - if ext in mimeTypes: - return mimeTypes[ext] + return mimeTypes.getOrDefault(ext, fallback) return fallback const JavaScriptTypes = [ -- cgit 1.4.1-2-gfad0