diff --git a/app/assets/javascripts/legislation_annotatable.js.coffee b/app/assets/javascripts/legislation_annotatable.js.coffee index 5a9481e64..0e7f1b4e1 100644 --- a/app/assets/javascripts/legislation_annotatable.js.coffee +++ b/app/assets/javascripts/legislation_annotatable.js.coffee @@ -100,7 +100,8 @@ App.LegislationAnnotatable = scrollToAnchor: -> annotationsLoaded: (annotations) -> - if anchor = $(location).attr('hash') + anchor = $(location).attr('hash') + if anchor && anchor.startsWith('#annotation') ann_id = anchor.split("-")[-1..] el = $("span[data-annotation-id='" + ann_id + "']") App.LegislationAllegations.show_comments()