mirror of
https://github.com/NotAShelf/direnv.nvim.git
synced 2025-10-03 07:23:35 +00:00
fix: check if status.state.foundRC equals vim.NIL
When opening nvim in a directory that does not contain a .envrc file, this would throw an error on startup. This is because `vim.json.decode` translates the json null to `vim.NIL`, which does not match Lua's `nil`
This commit is contained in:
parent
8e8c2a1d6e
commit
57a8fcdf29
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ M._get_rc_status = function(callback)
|
|||
return callback(nil, nil)
|
||||
end
|
||||
|
||||
if status.state.foundRC == nil then
|
||||
if status.state.foundRC == vim.NIL then
|
||||
cache.status = nil
|
||||
cache.path = nil
|
||||
cache.last_check = now
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue