sharedconfig: avoid initializing with config data

This commit is contained in:
NullBite 2023-06-23 02:34:51 -04:00
parent 49e861f3f4
commit 3d21950918
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -15,10 +15,10 @@ local function add_default_value(key, value)
defaults_table[key]=value
local stored_value=config:load(key)
if stored_value == nil then
sharedstate.add(key, value)
else
sharedstate.add(key, stored_value)
sharedstate.add(key, value)
if stored_value ~= nil then
sharedstate.set(key, stored_value)
end
end