From 5ea6e44ae5d55191780e8066825cbb28246f646f Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Sun, 24 May 2026 19:30:42 +0200 Subject: [PATCH] fix(libs): pick up coa-ace3 9583952 (AceDB falsy-defaults PR #10 backport) Re-sync after coa-ace3 9583952 backported WoWUIDev/Ace3 PR #10 which fixes the AceDB-3.0 simple-value defaults metatable: previously falsy defaults like ["*"] = false read back as nil because of `k2~=nil and v or nil` short-circuiting. Now they round-trip correctly. --- ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua b/ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua index 231196c..f83a715 100644 --- a/ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua +++ b/ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua @@ -111,7 +111,15 @@ local function copyDefaults(dest, src) end else -- Values are not tables, so this is just a simple return - local mt = {__index = function(t,k2) return k2~=nil and v or nil end} + -- (PR #10 backport: the old `k2~=nil and v or nil` short-circuits to + -- nil whenever the default `v` itself is falsy — so `["*"] = false` + -- defaults silently became nil. Make the read explicit instead.) + local mt = { + __index = function(t,k2) + if k2 == nil then return nil end + return v + end, + } setmetatable(dest, mt) end elseif type(v) == "table" then