Skip to content
This repository has been archived by the owner on Feb 1, 2018. It is now read-only.

Commit

Permalink
fixed flow type error (reference: verekia/js-stack-from-scratch#249)
Browse files Browse the repository at this point in the history
Pomodoro Clock (with React + Redux)
  • Loading branch information
htbkoo committed Dec 20, 2017
1 parent 89b52bc commit d594609
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(<App/>, document.getElementById('root'));
const ROOT_CONTAINER_SELECTOR = 'root';
const rootEl = document.getElementById(ROOT_CONTAINER_SELECTOR);
if (!(rootEl instanceof Element)) {
throw new Error('invalid type');
}
ReactDOM.render(<App/>, rootEl);
registerServiceWorker();

0 comments on commit d594609

Please sign in to comment.