From: Amal Khandelwal Date: Sat, 30 Nov 2019 16:53:28 +0000 (+0530) Subject: Docs: Prevent JS error if Vimeo does not load. Resolves #2635. X-Git-Tag: 0.8.1~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62be5ba8bc13a8e68e33c3e0391f3c321fed6aac;p=thirdparty%2Fbulma.git Docs: Prevent JS error if Vimeo does not load. Resolves #2635. --- diff --git a/docs/_javascript/index.js b/docs/_javascript/index.js index a7678c1e3..f59e8c4f7 100644 --- a/docs/_javascript/index.js +++ b/docs/_javascript/index.js @@ -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'); diff --git a/docs/lib/index.js b/docs/lib/index.js index 425239646..79d599741 100644 --- a/docs/lib/index.js +++ b/docs/lib/index.js @@ -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');