diff --git a/docs/_javascript/index.js b/docs/_javascript/index.js index 08753358..a7678c1e 100644 --- a/docs/_javascript/index.js +++ b/docs/_javascript/index.js @@ -4,12 +4,14 @@ document.addEventListener('DOMContentLoaded', () => { const introVideo = document.getElementById('introVideo'); const introIframe = document.getElementById('introIframe'); - const introPlayer = new Vimeo.Player(introIframe); const npmClipboard = new Clipboard('#npmCopy'); - introPlayer.ready().then(function() { - introVideo.classList.add('has-loaded'); - }); + if (Vimeo) { + const introPlayer = new Vimeo.Player(introIframe); + introPlayer.ready().then(function() { + introVideo.classList.add('has-loaded'); + }); + } npmClipboard.on('success', function(e) { e.trigger.innerText = 'copied!';