mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Fix scrollToTarget when element id has encoded uri components
This commit is contained in:
parent
cc509c17f2
commit
e9c9884a13
1 changed files with 3 additions and 1 deletions
|
@ -157,7 +157,9 @@ class app.views.Content extends app.View
|
|||
$.stopEvent(event)
|
||||
|
||||
findTargetByHash: (hash) ->
|
||||
try $.id decodeURIComponent(hash) catch
|
||||
el = try $.id decodeURIComponent(hash) catch
|
||||
el or= try $.id(hash) catch
|
||||
el
|
||||
|
||||
isExternalUrl: (url) ->
|
||||
url?[0..5] in ['http:/', 'https:']
|
||||
|
|
Loading…
Reference in a new issue