diff options
Diffstat (limited to 'app/javascript/packs')
-rw-r--r-- | app/javascript/packs/public.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index e5fdc7f83..1cb491e17 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -63,7 +63,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'); |