mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-16 01:43:24 +09:00
backport #38742
This commit is contained in:
@@ -80,7 +80,13 @@ export function initRepoPullMergeBox(el: HTMLElement) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.removeEventListener('visibilitychange', onVisibilityChange);
|
document.removeEventListener('visibilitychange', onVisibilityChange);
|
||||||
const newElem = createElementFromHTML(await resp.text());
|
|
||||||
|
const respText = (await resp.text()).trim();
|
||||||
|
if (!respText) {
|
||||||
|
el.remove(); // merge box might not exist if the PR has changed (e.g.: merged and the head branch has been deleted)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const newElem = createElementFromHTML(respText);
|
||||||
el.replaceWith(newElem);
|
el.replaceWith(newElem);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user