Skip to content

Commit

Permalink
fix: fix bug with some entries being overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
gwatcha committed Aug 19, 2020
1 parent 720be37 commit cac9170
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/utils/definitions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ end


function concatEntryTables(t1,t2)
local merged_tables = {}
local merged_tables = t1
for action_type, entries in pairs(t1) do
if t2[action_type] then
merged_tables[action_type] = concatEntries(t1[action_type], t2[action_type])
local merged = concatEntries(t1[action_type], t2[action_type])
merged_tables[action_type] = merged
end
end

Expand All @@ -60,6 +61,7 @@ function definitions.getPossibleEntries(context)
local merged_table = {}
merged_table = concatEntryTables(merged_table, definition_tables['global'])
merged_table = concatEntryTables(merged_table, definition_tables[context])

return merged_table
end

Expand Down

0 comments on commit cac9170

Please sign in to comment.