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

DevTools: Improve browser extension iframe support #19854

Merged
merged 14 commits into from
Sep 23, 2020
Merged
Prev Previous commit
delete unused function
  • Loading branch information
omarsy committed Sep 17, 2020
commit ae0bd285fe1a76d4b500290ee717e1aed3dae781
5 changes: 1 addition & 4 deletions packages/react-devtools-shared/src/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,7 @@ export function installHook(target: any): DevToolsHook | null {
const listeners = {};
const renderers = new Map();

let hook: DevToolsHook;
if (canAccessParentWindow(target) && !isMainWindow(target)) {
hook = getMainWindow(target).__REACT_DEVTOOLS_GLOBAL_HOOK__;
}
let hook: DevToolsHook = getMainWindow(target).__REACT_DEVTOOLS_GLOBAL_HOOK__;
if (!hook) {
hook = {
rendererInterfaces,
Expand Down