Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/core/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ if (__DEV__) {
var ExecutionEnvironment = require('ExecutionEnvironment');
if (ExecutionEnvironment.canUseDOM &&
window.top === window.self &&
navigator.userAgent.indexOf('Chrome') > -1) {
navigator.userAgent.indexOf('Chrome') > -1 &&
typeof __react_devtools__ === "undefined") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nit-picky, but I believe we use single quotes for 'undefined' everywhere else.

On another note, would it not make sense to always display the message (appended with for Chrome unless the global is defined), unless __react_devtools__ is defined, that way, people who prefer IE or FF are still made aware of it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. At KA we use double quotes so I get mixed up when switching.

My guess is users of other browsers would find that annoying.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, we opted to just show it to people in the browser we support. When we get a FF extension (who wants to write it with me?), we'll show the message there too.

Otherwise, I think we should just market the extension more strongly on the site so that people with other browsers know that Chrome+extension is an option.

console.debug(
'Download the React DevTools for a better development experience: ' +
'http://fb.me/react-devtools'
Expand Down