Skip to content

Commit

Permalink
Don't revert to default when value is falsy
Browse files Browse the repository at this point in the history
  • Loading branch information
boatbomber committed Nov 1, 2022
1 parent dd8e814 commit 8541ab3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,9 @@ function SheetValues.new(SpreadId: string, SheetId: string?)
--print(httpSuccess,httpResult)
end

function SheetManager:GetValue(Name: string, Default: any)
return self.Values[Name] or Default
function SheetManager:GetValue(Name: string, Default: any?)
local value = self.Values[Name]
return if value ~= nil then value else Default
end

function SheetManager:GetValueChangedSignal(Name: string)
Expand Down

0 comments on commit 8541ab3

Please sign in to comment.