From 7d3e93e7b4de0e830c7e5058b809e3f783b42ec5 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Thu, 17 Sep 2020 08:18:28 -0400 Subject: [PATCH] fix: Don't pass nil to scoring func --- lua/telescope/sorters.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/sorters.lua b/lua/telescope/sorters.lua index dd7cf4f..5931eb0 100644 --- a/lua/telescope/sorters.lua +++ b/lua/telescope/sorters.lua @@ -26,7 +26,7 @@ end function Sorter:score(prompt, entry) -- TODO: Decide if we actually want to check the type every time. - return self:scoring_function(prompt, type(entry) == "string" and entry or entry.ordinal, entry) + return self:scoring_function(prompt or "", type(entry) == "string" and entry or entry.ordinal, entry) end function sorters.new(...)