Skip to content

Commit

Permalink
Merge pull request #98 from pturner-roblox/connect-traceback-flag
Browse files Browse the repository at this point in the history
#flagged - Add Flag around disabling connection callbacks
  • Loading branch information
jkelaty-rbx authored Nov 19, 2024
2 parents 9099e95 + 68cb44c commit f29a4de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Signal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
]]
local __DEV__ = _G.__DEV__

local _, FFlagRoduxRemoveConnectTraceback = xpcall(function()
return game:DefineFastFlag("RoduxRemoveConnectTraceback", false)
end, function()
return true
end)

local function immutableAppend(list, ...)
local new = {}
local len = #list
Expand Down Expand Up @@ -80,7 +86,7 @@ function Signal:connect(callback)
disconnectTraceback = nil,
}

if __DEV__ then
if not FFlagRoduxRemoveConnectTraceback or __DEV__ then
listener.connectTraceback = debug.traceback()
end

Expand All @@ -100,7 +106,7 @@ function Signal:connect(callback)
error("You may not unsubscribe from a store listener while the reducer is executing.")
end

if __DEV__ then
if not FFlagRoduxRemoveConnectTraceback or __DEV__ then
listener.disconnectTraceback = debug.traceback()
end

Expand Down

0 comments on commit f29a4de

Please sign in to comment.