about summary refs log tree commit diff
path: root/app/javascript/packs
diff options
context:
space:
mode:
authorPatrickRWells <32802366+PatrickRWells@users.noreply.github.com>2018-08-25 16:19:13 -0700
committerEugen Rochko <eugen@zeonfederated.com>2018-08-26 01:19:13 +0200
commit5c42e8b51bec4bed32326989037fd519ba58dbe6 (patch)
treee000775dfa927f4cfbc7c0263f43fde6e128340a /app/javascript/packs
parentb4ba4b1b5da8d3c7a63ee41c2a440767e1e23104 (diff)
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
Diffstat (limited to 'app/javascript/packs')
-rw-r--r--app/javascript/packs/public.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index dc18da853..c83e2889a 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');