mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 19:54:09 +00:00
fix(charm-sync): preserve global patch list order for nil patches
Resolves #67
This commit is contained in:
parent
c31e5c5a34
commit
2fc3be34d0
2 changed files with 24 additions and 3 deletions
|
|
@ -125,8 +125,8 @@ local function diffGlobalUpdateBuffer(): { any }
|
|||
local patchCount = #globalUpdates
|
||||
local patches = table.create(patchCount)
|
||||
|
||||
for _, update in globalUpdates do
|
||||
table.insert(patches, patch.diff(update.oldValue, update.newValue))
|
||||
for index, update in globalUpdates do
|
||||
patches[index] = patch.diff(update.oldValue, update.newValue)
|
||||
end
|
||||
|
||||
return patches
|
||||
|
|
@ -146,7 +146,7 @@ local function selectFromGlobalPatchList(client: any, globalPatches: { any }): {
|
|||
for index, update in globalUpdates do
|
||||
local patchData = globalPatches[index]
|
||||
|
||||
if not patchData then
|
||||
if patchData == nil then
|
||||
continue
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue