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:
1 parent
8951c5fc9d
commit
6e3bc8a2e8
1 file changed
+5
-1
+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