Minor fix

Fixed the need of reloading page for PRs to appear when navigating in the repo pages and back to the root.
This commit is contained in:
Sagi Dayan 2021-07-06 17:13:08 +03:00 committed by GitHub
parent 97ff0d704d
commit 902bc14b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,8 +39,10 @@ async function getPRs() {
setInterval(() => { setInterval(() => {
const urlSplit = document.URL.split('/'); 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('/') const location = urlSplit.slice(-2).join('/')
if (location !== currentRepo) { if (location !== currentRepo) {
currentRepo = location; currentRepo = location;