diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-04-05 14:40:22 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-04-06 21:48:25 +0200 |
| commit | 826683b1bfd704f4691bc7522411672a9cae5059 (patch) | |
| tree | 26bb24afea7bf0d5c0fe45f1f3fcc67a9f8dc477 /lua/nvim-treesitter/utils.lua | |
| parent | 06c9ef810474100d3e15c62827410928ac1a10b5 (diff) | |
Fix: allow empty path in utils.get_at_path
Diffstat (limited to 'lua/nvim-treesitter/utils.lua')
| -rw-r--r-- | lua/nvim-treesitter/utils.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/utils.lua b/lua/nvim-treesitter/utils.lua index ab8498b0..1d2bb22c 100644 --- a/lua/nvim-treesitter/utils.lua +++ b/lua/nvim-treesitter/utils.lua @@ -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 |
