From 68cb44ceeceff04e50c6dd2eebd2a70fa6d35cb4 Mon Sep 17 00:00:00 2001 From: Peter Turner Date: Tue, 19 Nov 2024 13:45:45 -0800 Subject: [PATCH] #flagged - Add Flag around disabling connection callbacks --- src/Signal.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Signal.lua b/src/Signal.lua index db8d4bd..b85300d 100644 --- a/src/Signal.lua +++ b/src/Signal.lua @@ -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 @@ -80,7 +86,7 @@ function Signal:connect(callback) disconnectTraceback = nil, } - if __DEV__ then + if not FFlagRoduxRemoveConnectTraceback or __DEV__ then listener.connectTraceback = debug.traceback() end @@ -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