aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/lua/converter.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c
index fd2bdbd677..ca0be28fac 100644
--- a/src/nvim/lua/converter.c
+++ b/src/nvim/lua/converter.c
@@ -148,7 +148,7 @@ static LuaTableProps nlua_traverse_table(lua_State *const lstate)
}
} else {
if (tsize == 0
- || (tsize == ret.maxidx
+ || (tsize <= ret.maxidx
&& other_keys_num == 0
&& ret.string_keys_num == 0)) {
ret.type = kObjectTypeArray;
@@ -1129,10 +1129,6 @@ Object nlua_pop_Object(lua_State *const lstate, bool ref, Error *const err)
}
const size_t idx = cur.obj->data.array.size++;
lua_rawgeti(lstate, -1, (int)idx + 1);
- if (lua_isnil(lstate, -1)) {
- lua_pop(lstate, 2);
- continue;
- }
kvi_push(stack, cur);
cur = (ObjPopStackItem) {
.obj = &cur.obj->data.array.items[idx],