mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
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:
commit
b66e92d4f5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user