Skip to content

Commit

Permalink
[fix][compile] Ensure root component is always present
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora Tarano committed Sep 9, 2019
1 parent b5fcabc commit b6438b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/renderAllComponents.jsx
Expand Up @@ -5,6 +5,14 @@ import DateRangePickerWrapper from '../examples/DateRangePickerWrapper';
import SingleDatePickerWrapper from '../examples/SingleDatePickerWrapper';
import PresetDateRangePickerWrapper from '../examples/PresetDateRangePicker';

const element = document.getElementById('root');
if (!element) {
// Make sure the #root element is defined
const root = document.createElement('div');
root.id = 'root';
document.body.appendChild(root);
}

function App() {
return (
<div>
Expand Down

0 comments on commit b6438b0

Please sign in to comment.