Skip to content

Commit

Permalink
DevTools: Remove ReactJS.org version check "cheat" (facebook#19939)
Browse files Browse the repository at this point in the history
Remove dead code as facebook.github.io/react always redirects to reactjs.org, which has prod version of react. so removing the "cheat" (facebook#19939)
  • Loading branch information
sktguha authored and koto committed Jun 15, 2021
1 parent 5526f4e commit 3545e47
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions packages/react-devtools-extensions/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,7 @@ chrome.runtime.onMessage.addListener((request, sender) => {
// We use browserAction instead of pageAction because this lets us
// display a custom default popup when React is *not* detected.
// It is specified in the manifest.
let reactBuildType = request.reactBuildType;
if (sender.url.indexOf('facebook.github.io/react') !== -1) {
// Cheat: We use the development version on the website because
// it is better for interactive examples. However we're going
// to get misguided bug reports if the extension highlights it
// as using the dev version. We're just going to special case
// our own documentation and cheat. It is acceptable to use dev
// version of React in React docs, but not in any other case.
reactBuildType = 'production';
}

setIconAndPopup(reactBuildType, sender.tab.id);
setIconAndPopup(request.reactBuildType, sender.tab.id);
}
}
});

0 comments on commit 3545e47

Please sign in to comment.