Only open annotations if the anchor is for an annotation

This commit is contained in:
Fernando Blat
2017-01-19 11:06:41 +01:00
parent 6f698ec9a6
commit 3bb77b7536

View File

@@ -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()