diff --git a/src/templates/nodes/custom/comment/list_embed_base.pug b/src/templates/nodes/custom/comment/list_embed_base.pug index 4856a0bd..7ffa47d9 100644 --- a/src/templates/nodes/custom/comment/list_embed_base.pug +++ b/src/templates/nodes/custom/comment/list_embed_base.pug @@ -100,12 +100,13 @@ script. var scrollToId = location.hash; // Check that it's a valid ObjectID before passing it to jQuery. - if (!/^[a-fA-F0-9]{24}$/.test(scrollToId)) return; + if (!/^[a-fA-F0-9]{24}$/.test(scrollToId.replace('#',''))) return; $(scrollToId) .addClass('comment-linked') .scrollHere(); } + $(scrollToLinkedComment); {% endif %}