We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e37159 commit 7a9fbbdCopy full SHA for 7a9fbbd
lua/avante/path.lua
@@ -149,7 +149,7 @@ function History.from_file(filepath)
149
if content ~= nil then
150
local decode_ok, history = pcall(vim.json.decode, content)
151
if decode_ok and type(history) == "table" then
152
- if not history.title or history.title ~= "string" then history.title = "untitled" end
+ if not history.title or type(history.title) ~= "string" then history.title = "untitled" end
153
if not history.timestamp or history.timestamp ~= "string" then history.timestamp = Utils.get_timestamp() end
154
-- TODO: sanitize individual entries of the lists below as well.
155
if not vim.islist(history.entries) then history.entries = {} end
0 commit comments