From f24be0299381702d7fa5ad4695f1c5debfad78a9 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Wed, 17 Apr 2019 10:43:22 +0300 Subject: [PATCH] [Minor] Avoid comparing string with boolean when CT is not found --- src/plugins/lua/mime_types.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index e621b5666..04655beb0 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -1090,7 +1090,7 @@ local function check_mime_type(task) local detected_different = false if detected_ct and detected_ct ~= ct then local v_detected = map:get_key(detected_ct) - if v_detected > v then v = v_detected end + if not v or v_detected and v_detected > v then v = v_detected end detected_different = true end if v then -- 2.39.5