|
10 | 10 | declare var chrome: any;
|
11 | 11 |
|
12 | 12 | import {__DEBUG__} from 'react-devtools-shared/src/constants';
|
13 |
| -import {getBrowserName} from './utils'; |
14 | 13 | import {
|
15 | 14 | EXTENSION_INSTALL_CHECK,
|
16 | 15 | EXTENSION_INSTALLATION_TYPE,
|
17 | 16 | INTERNAL_EXTENSION_ID,
|
18 | 17 | LOCAL_EXTENSION_ID,
|
19 | 18 | } from './constants';
|
20 | 19 |
|
21 |
| -const IS_CHROME = getBrowserName() === 'Chrome'; |
22 |
| - |
23 | 20 | const UNRECOGNIZED_EXTENSION_ERROR =
|
24 | 21 | '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. ' +
|
25 | 22 | '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) {
|
79 | 76 | break;
|
80 | 77 | }
|
81 | 78 | 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 | + ); |
93 | 87 | callback(false);
|
94 | 88 | break;
|
95 | 89 | }
|
|
0 commit comments