fix: Don't pass nil to scoring func

This commit is contained in:
TJ DeVries
2020-09-17 08:18:28 -04:00
parent 17ee4a96ff
commit 7d3e93e7b4

View File

@@ -26,7 +26,7 @@ end
function Sorter:score(prompt, entry) function Sorter:score(prompt, entry)
-- TODO: Decide if we actually want to check the type every time. -- 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 end
function sorters.new(...) function sorters.new(...)