Update to react to changes in pr URL

This commit is contained in:
Caleb Owens 2024-02-20 12:54:20 +00:00 committed by Mattias Granlund
parent 6a741c22cc
commit 0fb074a7a1
2 changed files with 6 additions and 6 deletions

View File

@ -14,15 +14,15 @@
export let hasIntegratedCommits = false;
export let isLaneCollapsed: Persisted<boolean>;
function updateContextMenu() {
function updateContextMenu(copyablePrUrl: string) {
if (popupMenu) popupMenu.$destroy();
return new ViewPrContextMenu({
target: document.body,
props: { prUrl: prUrl || '' }
props: { prUrl: copyablePrUrl }
});
}
$: popupMenu = updateContextMenu();
$: popupMenu = updateContextMenu(prUrl || '');
onDestroy(() => {
if (popupMenu) {

View File

@ -25,15 +25,15 @@
let container: HTMLDivElement;
let isApplying = false;
function updateContextMenu() {
function updateContextMenu(copyablePrUrl: string) {
if (popupMenu) popupMenu.$destroy();
return new ViewPrContextMenu({
target: document.body,
props: { prUrl: pr?.htmlUrl || '' }
props: { prUrl: copyablePrUrl }
});
}
$: popupMenu = updateContextMenu();
$: popupMenu = updateContextMenu(pr?.htmlUrl || '');
onDestroy(() => {
if (popupMenu) {