diff options
Diffstat (limited to 'src/content/dependencies/linkAlbumDynamically.js')
| -rw-r--r-- | src/content/dependencies/linkAlbumDynamically.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/dependencies/linkAlbumDynamically.js b/src/content/dependencies/linkAlbumDynamically.js index ba572c8d..3801b218 100644 --- a/src/content/dependencies/linkAlbumDynamically.js +++ b/src/content/dependencies/linkAlbumDynamically.js @@ -31,7 +31,7 @@ export default { // When linking to an album *from* an album commentary page, // if the link is to the *same* album, then the effective target // of the link is really the album's commentary, so scroll to it. - (pagePath[0] === 'albumCommentary' && + (pagePath[0].match(/albumCommentary$/i) && pagePath[1] === data.albumDirectory && data.albumHasCommentary ? relations.infoLink.slots({ @@ -42,11 +42,11 @@ export default { // When linking to *another* album from an album commentary page, // the target is (by default) still just the album (its info page). // But this can be customized per-link! - : pagePath[0] === 'albumCommentary' && + : pagePath[0].match(/albumCommentary$/i) && slots.linkCommentaryPages ? relations.commentaryLink - : pagePath[0] === 'albumGallery' + : pagePath[0].match(/albumGallery$/i) ? relations.galleryLink : relations.infoLink), |