1
Fork 0

Fixed problem with rendering to null DOM component

This commit is contained in:
Jake Howard 2016-01-14 18:49:30 +00:00
parent 7552e20cbc
commit 38964fbd61

View file

@ -14,10 +14,10 @@ if ($('body').hasClass('index')) { // Render components on index
React.render(<ProjectImagesMain />, document.getElementById('project-images-main')); React.render(<ProjectImagesMain />, document.getElementById('project-images-main'));
} }
if ($('navbar')) { if ($('navbar').length > 0) {
React.render(<NavBar />, $('navbar')[0]); React.render(<NavBar />, $('navbar')[0]);
} }
if ($('#breadcrumbs')) { if ($('#breadcrumbs') > 0) {
React.render(<Breadcrumbs />, $('#breadcrumbs')[0]); React.render(<Breadcrumbs />, $('#breadcrumbs')[0]);
} }