This commit is contained in:
tobi 2025-04-09 13:53:00 +02:00
commit befa318065
6 changed files with 43 additions and 18 deletions

View file

@ -144,11 +144,12 @@ lightbox.on('uiRegister', function() {
el.setAttribute('rel', 'noopener');
pswp.on('change', () => {
switch (true) {
case pswp.currSlide.data.parentStatus:
case pswp.currSlide.data.parentStatus !== undefined:
// Link to parent status.
el.href = pswp.currSlide.data.parentStatus;
break;
case pswp.currSlide.data.element && pswp.currSlide.data.element.dataset.pswpParentStatus:
case pswp.currSlide.data.element !== undefined &&
pswp.currSlide.data.element.dataset.pswpParentStatus !== undefined:
// Link to parent status.
el.href = pswp.currSlide.data.element.dataset.pswpParentStatus;
break;