From 3bc154bbb37d9a2d25a11134c4337af06030cd5e Mon Sep 17 00:00:00 2001 From: ray-x Date: Fri, 14 Jan 2022 10:36:54 +1100 Subject: [PATCH] issue #135 bugfix --- README.md | 3 +-- lua/navigator/util.lua | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a675ad..33f4ac1 100644 --- a/README.md +++ b/README.md @@ -383,8 +383,7 @@ require'navigator'.setup({ ### Try it your self -In `playground` folder, there is a `init.lua` and source code for you to play with. Check [playground/README.md](https://github.com/ray-x/navigator.lua/blob/master/playground/README.md) for more -details +In `playground` folder, there is a `init.lua` and source code for you to play with. Check [playground/README.md](https://github.com/ray-x/navigator.lua/blob/master/playground/README.md) for more details ### Default keymaps diff --git a/lua/navigator/util.lua b/lua/navigator/util.lua index 897a63e..722dd57 100644 --- a/lua/navigator/util.lua +++ b/lua/navigator/util.lua @@ -395,6 +395,10 @@ function M.empty(t) if t == nil then return true end + + if type(t) ~= 'table' then + return false + end return next(t) == nil end