Remove reduntant check on s2
This commit is contained in:
parent
2de3246915
commit
ff4a3bb5ff
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue