summaryrefslogtreecommitdiff
path: root/std/media_types/mod.ts
diff options
context:
space:
mode:
authorYusuke Sakurai <kerokerokerop@gmail.com>2020-02-07 16:23:38 +0900
committerGitHub <noreply@github.com>2020-02-07 02:23:38 -0500
commitc2986891f6aac87cec98232735945af756e6643f (patch)
tree716dc739f438bf740fa960b87fc022d569090802 /std/media_types/mod.ts
parentea6179f7dce89416f1586ee18c2f437e68eabd38 (diff)
remove non-null assertion operator from std (part1) (#3900)
Diffstat (limited to 'std/media_types/mod.ts')
-rw-r--r--std/media_types/mod.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/media_types/mod.ts b/std/media_types/mod.ts
index 6a6067a0e..b281b2089 100644
--- a/std/media_types/mod.ts
+++ b/std/media_types/mod.ts
@@ -56,8 +56,8 @@ function populateMaps(
extensions.set(type, exts);
for (const ext of exts) {
- if (types.has(ext)) {
- const current = types.get(ext)!;
+ const current = types.get(ext);
+ if (current) {
const from = preference.indexOf(db[current].source);
const to = preference.indexOf(mime.source);