Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevTools: Remove ReactJS.org version check "cheat" #19939

Merged
merged 2 commits into from
Oct 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
});