From 302f184664e3b8091235590a65fef90b1bed95ab Mon Sep 17 00:00:00 2001 From: Sviatoslav Makhynko Date: Sat, 30 Nov 2024 20:27:23 +0100 Subject: [PATCH] fix: asciinema-player --- src/components/ui/Asciinema.astro | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/ui/Asciinema.astro b/src/components/ui/Asciinema.astro index 1c84cfc9df..e9ad436841 100644 --- a/src/components/ui/Asciinema.astro +++ b/src/components/ui/Asciinema.astro @@ -61,15 +61,15 @@ const demoId = 'asciinema-demo-' + src.split('/').pop().split('.')[0]; document.fonts.load('1em ' + settings.terminalFontFamily).then(() => { const player = AsciinemaPlayer.create(src, this, settings); - }); - if (this.dataset.title) { - document - .getElementById(`${this.id}-link`) - .addEventListener('click', (e) => { - player.play(); - }); - } + if (this.dataset.title) { + document + .getElementById(`${this.id}-link`) + .addEventListener('click', (e) => { + player.play(); + }); + } + }); } }