mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[DevTools] Check if Proxy exists before creating DispatcherProxy (#25278)
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user