Skip to content

Commit

Permalink
Fix for empty best time
Browse files Browse the repository at this point in the history
Addon would crash without a saved best time.
  • Loading branch information
MaeBee committed Jul 1, 2017
1 parent 346b653 commit 7e8bf36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion WereWatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
-- by gobbo (@gobbo1008)
WereWatch = {}
WereWatch.name = "WereWatch"
WereWatch.version = 1.2
WereWatch.version = 1.3

function WereWatch:Initialize()
self.savedVariables = ZO_SavedVars:New("WereWatchSavedVariables", 1, nil, {})
self.werewolf = IsWerewolf()
local left = self.savedVariables.left
local top = self.savedVariables.top
if self.savedVariables.bestTime == nil then
self.savedVariables.bestTime = 0
end -- if
WereWatchUI:ClearAnchors()
WereWatchUI:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
WereWatch.evalOptions()
Expand Down

0 comments on commit 7e8bf36

Please sign in to comment.