Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#flagged - Add Flag around disabling connection callbacks #98

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading