Skip to content

Commit c0bd1e0

Browse files
author
Juan Tejada
committed
Revert "Only show DevTools warning about unrecognized build in Chrome (facebook#22571)"
This reverts commit b72dc8e.
1 parent 996da67 commit c0bd1e0

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

packages/react-devtools-extensions/src/checkForDuplicateInstallations.js

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@
1010
declare var chrome: any;
1111

1212
import {__DEBUG__} from 'react-devtools-shared/src/constants';
13-
import {getBrowserName} from './utils';
1413
import {
1514
EXTENSION_INSTALL_CHECK,
1615
EXTENSION_INSTALLATION_TYPE,
1716
INTERNAL_EXTENSION_ID,
1817
LOCAL_EXTENSION_ID,
1918
} from './constants';
2019

21-
const IS_CHROME = getBrowserName() === 'Chrome';
22-
2320
const UNRECOGNIZED_EXTENSION_ERROR =
2421
'React Developer Tools: You are running an unrecognized installation of the React Developer Tools extension, which might conflict with other versions of the extension installed in your browser. ' +
2522
'Please make sure you only have a single version of the extension installed or enabled. ' +
@@ -79,17 +76,14 @@ export function checkForDuplicateInstallations(callback: boolean => void) {
7976
break;
8077
}
8178
case 'unknown': {
82-
// TODO: Support duplicate extension detection in other browsers
83-
if (IS_CHROME) {
84-
// If we don't know how this extension was built, we can't reliably detect if there
85-
// are other installations of DevTools present.
86-
// In this case, assume there are no duplicate exensions and show a warning about
87-
// potential conflicts.
88-
console.error(UNRECOGNIZED_EXTENSION_ERROR);
89-
chrome.devtools.inspectedWindow.eval(
90-
`console.error("${UNRECOGNIZED_EXTENSION_ERROR}")`,
91-
);
92-
}
79+
// If we don't know how this extension was built, we can't reliably detect if there
80+
// are other installations of DevTools present.
81+
// In this case, assume there are no duplicate exensions and show a warning about
82+
// potential conflicts.
83+
console.error(UNRECOGNIZED_EXTENSION_ERROR);
84+
chrome.devtools.inspectedWindow.eval(
85+
`console.error("${UNRECOGNIZED_EXTENSION_ERROR}")`,
86+
);
9387
callback(false);
9488
break;
9589
}

0 commit comments

Comments
 (0)