Fixed: Move out setupDevtools call from renderApplication function

Reviewed By: sahrens

Differential Revision: D2620876

fb-gh-sync-id: 8971a1c523c06966dd11280e19272429aa3f9c8d
This commit is contained in:
Pawel Sienkowski 2015-11-05 08:16:05 -08:00 committed by facebook-github-bot-3
parent f5670f8ab5
commit 4e1f2f4e0f
2 changed files with 9 additions and 4 deletions

View File

@ -178,6 +178,14 @@ function setUpNumber() {
Number.MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -(Math.pow(2, 53) - 1);
}
function setUpDevTools() {
// not when debugging in chrome
if (__DEV__ && !window.document && require('Platform').OS === 'ios') {
var setupDevtools = require('setupDevtools');
setupDevtools();
}
}
setUpProcessEnv();
setUpRedBoxErrorHandler();
setUpTimers();
@ -190,6 +198,7 @@ setUpWebSockets();
setUpProfile();
setUpFlowChecker();
setUpNumber();
setUpDevTools();
// Just to make sure the JS gets packaged up. Wait until the JS environment has
// been initialized before requiring them.

View File

@ -69,10 +69,6 @@ function renderApplication<D, P, S>(
rootTag,
'Expect to have a valid rootTag, instead got ', rootTag
);
if (__DEV__ && !window.document) {
var setupDevtools = require('setupDevtools');
setupDevtools();
}
React.render(
<AppContainer rootTag={rootTag}>
<RootComponent