From 902bc14b96022ca14827bea520374466c380e3cd Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Tue, 6 Jul 2021 17:13:08 +0300 Subject: [PATCH] Minor fix Fixed the need of reloading page for PRs to appear when navigating in the repo pages and back to the root. --- github_list_own_prs_in_repo.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/github_list_own_prs_in_repo.js b/github_list_own_prs_in_repo.js index 1ffe446..8379c14 100644 --- a/github_list_own_prs_in_repo.js +++ b/github_list_own_prs_in_repo.js @@ -39,8 +39,10 @@ async function getPRs() { setInterval(() => { const urlSplit = document.URL.split('/'); - if (urlSplit.length !== 5) return; // Not A base repo URL - + if (urlSplit.length !== 5) { // Not A base repo URL + currentRepo = ''; + return; + } const location = urlSplit.slice(-2).join('/') if (location !== currentRepo) { currentRepo = location;