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

Commit

Permalink
Style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleitnick committed May 19, 2019
1 parent 3f3303f commit 1d5960a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/ServerStorage/Aero/Modules/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -495,25 +495,22 @@ function Data:Start()
local function FireBoundToCloseCallbacks()
local numBinded = #self._onCloseHandlers
if (numBinded == 0) then return end
local Bindable = Instance.new("BindableEvent")
local bindable = Instance.new("BindableEvent")
local numCompleted = 0

for _,func in pairs(self._onCloseHandlers) do
spawn(function()
local success, err = pcall(func)
if (not success) then
warn("BindToClose function errored: " .. tostring(err))
warn("Data BindToClose function failed: " .. tostring(err))
end

numCompleted = (numCompleted + 1)
if (numCompleted == numBinded) then
Bindable:Fire()
bindable:Fire()
end
end)
end

Bindable.Event:Wait()
Bindable:Destroy()
bindable.Event:Wait()
bindable:Destroy()
end

local function AutoSaveAllData()
Expand Down

0 comments on commit 1d5960a

Please sign in to comment.