aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/contextpopup.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/contextpopup.js')
-rw-r--r--web_src/js/features/contextpopup.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web_src/js/features/contextpopup.js b/web_src/js/features/contextpopup.js
index b97f77275a..aa73aad241 100644
--- a/web_src/js/features/contextpopup.js
+++ b/web_src/js/features/contextpopup.js
@@ -1,6 +1,7 @@
import Vue from 'vue';
import ContextPopup from '../components/ContextPopup.vue';
+import {parseIssueHref} from '../utils.js';
export default function initContextPopups() {
const refIssues = $('.ref-issue');
@@ -10,7 +11,9 @@ export default function initContextPopups() {
if ($(this).hasClass('ref-external-issue')) {
return;
}
- const [index, _issues, repo, owner] = $(this).attr('href').replace(/[#?].*$/, '').split('/').reverse();
+
+ const {owner, repo, index} = parseIssueHref($(this).attr('href'));
+ if (!owner) return;
const el = document.createElement('div');
el.className = 'ui custom popup hidden';