Skip to content

Commit e226151

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

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
@@ -14,14 +14,11 @@ import {
1414
LOCAL_EXTENSION_ID,
1515
__DEBUG__,
1616
} from 'react-devtools-shared/src/constants';
17-
import {getBrowserName} from './utils';
1817
import {
1918
EXTENSION_INSTALL_CHECK,
2019
EXTENSION_INSTALLATION_TYPE,
2120
} from './constants';
2221

23-
const IS_CHROME = getBrowserName() === 'Chrome';
24-
2522
const UNRECOGNIZED_EXTENSION_ERROR =
2623
'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. ' +
2724
'Please make sure you only have a single version of the extension installed or enabled. ' +
@@ -81,17 +78,14 @@ export function checkForDuplicateInstallations(callback: boolean => void) {
8178
break;
8279
}
8380
case 'unknown': {
84-
// TODO: Support duplicate extension detection in other browsers
85-
if (IS_CHROME) {
86-
// If we don't know how this extension was built, we can't reliably detect if there
87-
// are other installations of DevTools present.
88-
// In this case, assume there are no duplicate exensions and show a warning about
89-
// potential conflicts.
90-
console.error(UNRECOGNIZED_EXTENSION_ERROR);
91-
chrome.devtools.inspectedWindow.eval(
92-
`console.error("${UNRECOGNIZED_EXTENSION_ERROR}")`,
93-
);
94-
}
81+
// If we don't know how this extension was built, we can't reliably detect if there
82+
// are other installations of DevTools present.
83+
// In this case, assume there are no duplicate exensions and show a warning about
84+
// potential conflicts.
85+
console.error(UNRECOGNIZED_EXTENSION_ERROR);
86+
chrome.devtools.inspectedWindow.eval(
87+
`console.error("${UNRECOGNIZED_EXTENSION_ERROR}")`,
88+
);
9589
callback(false);
9690
break;
9791
}

0 commit comments

Comments
 (0)