Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Data Get fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleitnick committed May 9, 2019
1 parent 1aaa261 commit 20d4d91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ServerStorage/Aero/Modules/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ function Data:Get(key, defaultVal)
return self:_load(key):Then(function(value)
if (value == nil and defaultVal ~= nil) then
value = (typeof(defaultVal) ~= "table" and defaultVal or tableUtil.Copy(defaultVal))
return self:Set(key, value)
return self:Set(key, value):Then(function()
return value
end)
else
return value
end
Expand Down

0 comments on commit 20d4d91

Please sign in to comment.