Remove reduntant check on s2

This commit is contained in:
Gunter Labes 2022-06-19 21:51:05 +02:00
parent 2de3246915
commit ff4a3bb5ff
No known key found for this signature in database
GPG key ID: C0C7B971CC910216

View file

@ -28,7 +28,7 @@ end
function wc2_utils.pick_random(str, generator)
local s2 = wml.variables[str]
if s2 ~= nil or generator then
local array = s2 and stringx.split(s2 or "") or {}
local array = s2 and stringx.split(s2) or {}
if #array == 0 and generator then
array = generator()
end