From 8b0b1e4b4a74dfdbeca2fefec7a06577a892e2c4 Mon Sep 17 00:00:00 2001 From: Timothee Maret Date: Tue, 23 Jan 2024 17:50:01 +0100 Subject: [PATCH] issue-111 - Fix vimeo URLs under /video/x (#113) --- cigaradvisor/blocks/video/video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cigaradvisor/blocks/video/video.js b/cigaradvisor/blocks/video/video.js index 19712695..53574196 100644 --- a/cigaradvisor/blocks/video/video.js +++ b/cigaradvisor/blocks/video/video.js @@ -19,7 +19,7 @@ function embedYoutube(url, autoplay) { } function embedVimeo(url, autoplay) { - const [, video] = url.pathname.split('/'); + const video = url.pathname.split('/').at(-1); const suffix = autoplay ? '?muted=1&autoplay=1' : ''; return `