diff options
Diffstat (limited to 'web_src/js/features')
-rw-r--r-- | web_src/js/features/repo-code.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/repo-code.js b/web_src/js/features/repo-code.js index 7c74c253a2..f0f4ead125 100644 --- a/web_src/js/features/repo-code.js +++ b/web_src/js/features/repo-code.js @@ -153,7 +153,7 @@ export function initRepoCodeView() { }); $(window).on('hashchange', () => { - let m = window.location.hash.match(rangeAnchorRegex); + let m = rangeAnchorRegex.exec(window.location.hash.match); const $linesEls = $(getLineEls()); let $first; if (m) { @@ -170,7 +170,7 @@ export function initRepoCodeView() { return; } } - m = window.location.hash.match(singleAnchorRegex); + m = singleAnchorRegex.exec(window.location.hash.match); if (m) { $first = $linesEls.filter(`[rel=L${m[2]}]`); if ($first.length) { |