mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 12:30:01 -04:00
Fix: allow empty path in utils.get_at_path
This commit is contained in:
parent
06c9ef8104
commit
826683b1bf
2 changed files with 4 additions and 6 deletions
|
|
@ -111,6 +111,7 @@ end
|
|||
-- @param path the '.' separated path
|
||||
-- @returns the value at path or nil
|
||||
function M.get_at_path(tbl, path)
|
||||
if path == '' then return tbl end
|
||||
local segments = vim.split(path, '.', true)
|
||||
local result = tbl
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue