]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Docs: Prevent JS error if Vimeo does not load. Resolves #2635.
authorAmal Khandelwal <kriya@dismail.de>
Sat, 30 Nov 2019 16:53:28 +0000 (22:23 +0530)
committerJeremy Thomas <bbxdesign@gmail.com>
Sat, 30 Nov 2019 20:24:41 +0000 (15:24 -0500)
docs/_javascript/index.js
docs/lib/index.js

index a7678c1e30d2d53be05cc35e21a374a56b929af1..f59e8c4f7709d880f2ecb0a2a632ee8edbbc66d0 100644 (file)
@@ -6,7 +6,7 @@ document.addEventListener('DOMContentLoaded', () => {
   const introIframe = document.getElementById('introIframe');
   const npmClipboard = new Clipboard('#npmCopy');
 
-  if (Vimeo) {
+  if (window.Vimeo) {
     const introPlayer = new Vimeo.Player(introIframe);
     introPlayer.ready().then(function() {
       introVideo.classList.add('has-loaded');
index 425239646ab4779fd3ffdbb8c14c911dd5077a19..79d5997412fb803fbfc6aa5426464ecd6994cf9e 100644 (file)
@@ -8,7 +8,7 @@ document.addEventListener('DOMContentLoaded', function () {
   var introIframe = document.getElementById('introIframe');
   var npmClipboard = new Clipboard('#npmCopy');
 
-  if (Vimeo) {
+  if (window.Vimeo) {
     var introPlayer = new Vimeo.Player(introIframe);
     introPlayer.ready().then(function () {
       introVideo.classList.add('has-loaded');