Skip to content

Commit

Permalink
Added updateDetection within constructor to prevent nil comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
1ForeverHD committed Apr 7, 2021
1 parent bc39c39 commit 606bb35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Zone/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ function Zone.new(group)
self._currentExitDetection = nil -- This will also update automatically internally
self.totalPartVolume = 0

-- This updates _currentEnterDetection and _currentExitDetection right away to prevent nil comparisons
ZoneController.updateDetection(self)

-- Signals
self.updated = maid:give(Signal.new())
local triggerTypes = {
Expand Down

0 comments on commit 606bb35

Please sign in to comment.