diff options
-rw-r--r-- | acf/transaction/init.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/acf/transaction/init.lua b/acf/transaction/init.lua index e9b8bbc..003abdb 100644 --- a/acf/transaction/init.lua +++ b/acf/transaction/init.lua @@ -110,12 +110,17 @@ function Transaction:set_multiple(mods) if is_table then value = {} end set(path, not delete and t or nil, value, old == nil) + local function set_parent() + set(ppath, 'table', parent) + self.mod_time[ppath] = self.mod_time[path] + end + if old == nil and not delete then table.insert(parent, name) - set(ppath, 'table', parent) + set_parent() elseif old ~= nil and delete then remove_list_value(parent, name) - set(ppath, 'table', parent) + set_parent() end end end |