Docs: Prevent JS error if Vimeo does not load. Resolves #2635.

This commit is contained in:
Amal Khandelwal 2019-11-30 22:23:28 +05:30 committed by Jeremy Thomas
parent d6bda003b9
commit 62be5ba8bc
2 changed files with 2 additions and 2 deletions

View 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');

View 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');