From 62be5ba8bc13a8e68e33c3e0391f3c321fed6aac Mon Sep 17 00:00:00 2001 From: Amal Khandelwal Date: Sat, 30 Nov 2019 22:23:28 +0530 Subject: [PATCH] Docs: Prevent JS error if Vimeo does not load. Resolves #2635. --- docs/_javascript/index.js | 2 +- docs/lib/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_javascript/index.js b/docs/_javascript/index.js index a7678c1e..f59e8c4f 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 42523964..79d59974 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');