Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion blocks/slides/slides.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,15 @@ async function renderSlideBlock(block) {
}

export default async function decorate(block) {
const slideId = block.childElementCount === 1 ? block.firstElementChild.textContent?.trim() : '';
let slideId = block.childElementCount === 1 ? block.firstElementChild.textContent?.trim() : '';
if (!slideId) {
// UGP-14675 Anchor fallback for transitional pages
const anchor = block.querySelector('a[href*="/slides/"]');
if (anchor) {
const href = anchor.getAttribute('href');
slideId = href.split('/slides/').pop() || '';
}
}
if (slideId) {
block.classList.add('hide-slides');
fetchSlideById(slideId).then((slideResponse) => {
Expand Down
Loading