Skip to content

Commit

Permalink
fix(concat): check that arr2 is not nil before attempting to concaten…
Browse files Browse the repository at this point in the history
…ate it
  • Loading branch information
flexiondotorg committed Jan 15, 2025
1 parent f229ad3 commit 1941612
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smiti18n/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ local function localizedTranslate(key, loc, data)
end

local function concat(arr1, arr2)
if not arr2 then return arr1 end
for i = 1, #arr2 do
arr1[#arr1 + i] = arr2[i]
end
Expand Down

0 comments on commit 1941612

Please sign in to comment.