From daba4e202eb38d7790505e5993c25066fd47f357 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 31 Aug 2026 12:04:00 -0500 Subject: [PATCH] Default saved variables with 'or {}' instead of overwriting Seed the SavedVariables globals only when absent (X = X or {}) rather than unconditionally assigning {}. Behaviorally identical under the current load order -- a returning character's data is restored over these between file load and ADDON_LOADED -- but expresses intent as a default and won't clobber data if that timing ever changed. --- pfUI.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pfUI.lua b/pfUI.lua index 340a9a8b..ffdbec80 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -86,14 +86,13 @@ do end end --- initialize saved variables -pfUI_playerDB = {} -pfUI_config = {} -pfUI_init = {} -pfUI_profiles = {} -pfUI_addon_profiles = {} -pfUI_cache = {} -pfUI_throttle = {} +pfUI_playerDB = pfUI_playerDB or {} +pfUI_config = pfUI_config or {} +pfUI_init = pfUI_init or {} +pfUI_profiles = pfUI_profiles or {} +pfUI_addon_profiles = pfUI_addon_profiles or {} +pfUI_cache = pfUI_cache or {} +pfUI_throttle = pfUI_throttle or {} -- localization pfUI_locale = {}