diff options
author | bptato <nincsnevem662@gmail.com> | 2024-08-11 14:05:15 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-08-11 14:05:15 +0200 |
commit | a0c6f80f76d60bc2bb36942d4162b90e6b5aa2a2 (patch) | |
tree | dbf93dc3b168c4a9e135f0fa4e1300892645ba68 /src/utils | |
parent | d0910f85adfec4a2cddfe2297be821841f4dd671 (diff) | |
download | chawan-a0c6f80f76d60bc2bb36942d4162b90e6b5aa2a2.tar.gz |
dom: remove generic JS bindings
Dispatch manually with fromJS instead.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/mimeguess.nim | 3 |
1 files changed, 1 insertions, 2 deletions
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 = [ |