DevTools: Remove ReactJS.org version check "cheat" (#19939)
Remove dead code as facebook.github.io/react always redirects to reactjs.org, which has prod version of react. so removing the "cheat" (#19939)
Saikat Guha committed
Oct 1, 2020 at 19:46 UTC
91d2b6ef0189797dfc8f1dc6a89bc26fb2911b78
1 file changed
+1
-12
packages/react-devtools-extensions/src/background.js
+1
-12
@@ -98,18 +98,7 @@ chrome.runtime.onMessage.addListener((request, sender) => {
98
// We use browserAction instead of pageAction because this lets us
99
// display a custom default popup when React is *not* detected.
100
// It is specified in the manifest.
101
- let reactBuildType = request.reactBuildType;
102
- if (sender.url.indexOf('facebook.github.io/react') !== -1) {
103
- // Cheat: We use the development version on the website because
104
- // it is better for interactive examples. However we're going
105
- // to get misguided bug reports if the extension highlights it
106
- // as using the dev version. We're just going to special case
107
- // our own documentation and cheat. It is acceptable to use dev
108
- // version of React in React docs, but not in any other case.
109
- reactBuildType = 'production';
110
- }
111
-
112
- setIconAndPopup(reactBuildType, sender.tab.id);
101
+ setIconAndPopup(request.reactBuildType, sender.tab.id);
102
}
103
}
104
});