Skip to content

Commit f29a4de

Browse files
authored
Merge pull request #98 from pturner-roblox/connect-traceback-flag
#flagged - Add Flag around disabling connection callbacks
2 parents 9099e95 + 68cb44c commit f29a4de

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Signal.lua

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
]]
88
local __DEV__ = _G.__DEV__
99

10+
local _, FFlagRoduxRemoveConnectTraceback = xpcall(function()
11+
return game:DefineFastFlag("RoduxRemoveConnectTraceback", false)
12+
end, function()
13+
return true
14+
end)
15+
1016
local function immutableAppend(list, ...)
1117
local new = {}
1218
local len = #list
@@ -80,7 +86,7 @@ function Signal:connect(callback)
8086
disconnectTraceback = nil,
8187
}
8288

83-
if __DEV__ then
89+
if not FFlagRoduxRemoveConnectTraceback or __DEV__ then
8490
listener.connectTraceback = debug.traceback()
8591
end
8692

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

103-
if __DEV__ then
109+
if not FFlagRoduxRemoveConnectTraceback or __DEV__ then
104110
listener.disconnectTraceback = debug.traceback()
105111
end
106112

0 commit comments

Comments
 (0)