mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-16 11:00:23 +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
|
end
|
||||||
|
|
||||||
local out_data = path:read()
|
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)
|
local data = vim.json.decode(out_data)
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user