mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
fix(table): correctly check if table contains value for non-tables
Only strings were allowed through this initial check, but we want non-table values to check if v = value.
This commit is contained in:
@@ -6,7 +6,7 @@ local table = table
|
||||
local pairs = pairs
|
||||
|
||||
local function contains(tbl, value)
|
||||
if type(value) == 'string' then
|
||||
if type(value) ~= 'table' then
|
||||
for _, v in pairs(tbl) do
|
||||
if v == value then return true end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user