Docs: Prevent JS error if Vimeo does not load. Resolves #2635.
This commit is contained in:
parent
d6bda003b9
commit
62be5ba8bc
2 changed files with 2 additions and 2 deletions
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue