From 5c42e8b51bec4bed32326989037fd519ba58dbe6 Mon Sep 17 00:00:00 2001 From: PatrickRWells <32802366+PatrickRWells@users.noreply.github.com> Date: Sat, 25 Aug 2018 16:19:13 -0700 Subject: [PATCH] Fix CW issues in static view on Safari (Fixes #8354) (#8446) * Fix CW issues in static view on Safari (8354) * Fixed formatting issues * Trailing space --- app/javascript/packs/public.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index dc18da8534..c83e2889a0 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -79,7 +79,10 @@ function main() { .catch(error => console.error(error)); } - new Rellax('.parallax', { speed: -1 }); + const parallaxComponents = document.querySelectorAll('.parallax'); + if (parallaxComponents.length > 0 ) { + new Rellax('.parallax', { speed: -1 }); + } const history = createHistory(); const detailedStatuses = document.querySelectorAll('.public-layout .detailed-status');