Merge pull request #378 from mwishoff/harpoon2

If out_data is empty then write empty json to harpoon.json. Then read…
This commit is contained in:
ThePrimeagen 2023-12-05 20:21:12 -07:00 committed by GitHub
commit b66e92d4f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,12 @@ local function read_data()
end
local out_data = path:read()
if not out_data or out_data == '' then
write_data({})
out_data = path:read()
end
local data = vim.json.decode(out_data)
return data
end