diff --git a/packages/react-debug-tools/src/ReactDebugHooks.js b/packages/react-debug-tools/src/ReactDebugHooks.js index a09da97f90d72..6409647772eff 100644 --- a/packages/react-debug-tools/src/ReactDebugHooks.js +++ b/packages/react-debug-tools/src/ReactDebugHooks.js @@ -367,7 +367,11 @@ const DispatcherProxyHandler = { }, }; -const DispatcherProxy = new Proxy(Dispatcher, DispatcherProxyHandler); +// `Proxy` may not exist on some platforms +const DispatcherProxy = + typeof Proxy === 'undefined' + ? Dispatcher + : new Proxy(Dispatcher, DispatcherProxyHandler); // Inspect