updated for LuaLS findings
This commit is contained in:
@@ -293,7 +293,8 @@ do -- INIT DCS_UTIL
|
||||
if Util.tableLength(group_names) < 1 then return {} end
|
||||
|
||||
for k = 1, #group_names do
|
||||
local entry = nil
|
||||
---@type { unit : Unit|StaticObject|nil, groupname: string }|nil
|
||||
local entry
|
||||
local group = Group.getByName(group_names[k])
|
||||
if group ~= nil then
|
||||
entry = { unit = group:getUnit(1), groupname = group_names[k] }
|
||||
@@ -302,7 +303,7 @@ do -- INIT DCS_UTIL
|
||||
end
|
||||
|
||||
if entry and entry.unit and entry.unit:isExist() == true then
|
||||
units[#units + 1] = entry
|
||||
units[#units + 1] = { groupname = entry.groupname, unit = entry.unit }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user