From 1df903fdeb9ae7eaa048795b8d580ce2c98f40b0 Mon Sep 17 00:00:00 2001 From: Robert Kieffer Date: Mon, 25 Sep 2017 11:38:09 -0700 Subject: [PATCH] Fix #167 --- Mime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mime.js b/Mime.js index 985f42b7..56b3b648 100644 --- a/Mime.js +++ b/Mime.js @@ -47,8 +47,8 @@ class Mime { */ getType(path) { path = String(path); - var last = path.replace(/.*[/\\]/, '').toLowerCase(); - var ext = last.replace(/.*\./, '').toLowerCase(); + var last = path.replace(/^.*[/\\]/, '').toLowerCase(); + var ext = last.replace(/^.*\./, '').toLowerCase(); var hasPath = last.length < path.length; var hasDot = ext.length < last.length - 1;