From ca2c7b05014ec31740bd92723c951090b07902d8 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 29 Nov 2015 21:36:18 +0000 Subject: [PATCH] Made JS more efficient, and less errors --- static/src/js/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/src/js/app.js b/static/src/js/app.js index 170982a..cf35219 100644 --- a/static/src/js/app.js +++ b/static/src/js/app.js @@ -19,5 +19,7 @@ $(function() { // https://css-tricks.com/snippets/jquery/smooth-scrolling/ }); }); -React.render(, document.getElementById('project-images-types')); -React.render(, document.getElementById('project-images-main')); +if ($('body').hasClass('index')) { + React.render(, document.getElementById('project-images-types')); + React.render(, document.getElementById('project-images-main')); +}