Skip to content

Commit

Permalink
Fix merge not overwriting values (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukadev-0 authored Jun 11, 2024
1 parent d022d36 commit 01e3f53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Utility/merge.luau
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ local function merge(
return into
else
for key, value in from do
if into[key] == nil then
into[key] = value
elseif overwrite == "none" then
if into[key] ~= nil and overwrite == "none" then
External.logError("mergeConflict", nil, tostring(key))
else
into[key] = value
end
end
return merge(if overwrite == "first" then "none" else overwrite, into, ...)
Expand Down

0 comments on commit 01e3f53

Please sign in to comment.