Fix lint errors on new luals version (#384)

This commit is contained in:
Cooldude2606 authored and GitHub committed 2025-04-06 17:05:40 +01:00
1 parent 3dbdb2071f
commit aedc3cff6b
7 files changed
+11 -8

No files matched your search

+2
View File
@@ -37,6 +37,7 @@ local function nop() return nil, nil end
local function next_valid_element(elements, prev_index)
local element_index, element = next(elements, prev_index)
while element and not element.valid do
--- @cast element_index -nil
elements[element_index] = nil
element_index, element = next(elements, element_index)
end
@@ -61,6 +62,7 @@ local function next_valid_player(scope_elements, players, prev_index, online)
if index == nil then
return nil, nil, nil
end
--- @cast player -nil
if online == nil or player.connected == online then
local player_elements = scope_elements[player.index]