mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
If out_data is empty then write empty json to harpoon.json. Then read it back into out_data.
This commit is contained in:
parent
d8fa264598
commit
05edc3ee82
@ -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