From 94fa0fed5daab036de52026e267b6b9775d80f7f Mon Sep 17 00:00:00 2001 From: estib Date: Thu, 3 Oct 2024 11:58:01 +0200 Subject: [PATCH] fix: Update the type of the drop down button Fix up the type of variable used to refernce the drop down button in the PR button component --- apps/desktop/src/lib/pr/PullRequestButton.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/lib/pr/PullRequestButton.svelte b/apps/desktop/src/lib/pr/PullRequestButton.svelte index 4aa005718..cd6b97fe6 100644 --- a/apps/desktop/src/lib/pr/PullRequestButton.svelte +++ b/apps/desktop/src/lib/pr/PullRequestButton.svelte @@ -23,7 +23,7 @@ const { loading, disabled, tooltip, click }: Props = $props(); const preferredAction = persisted(Action.Create, 'projectDefaultPrAction'); - let dropDown: DropDownButton; + let dropDown = $state>(); $effect(() => { if (!Object.values(Action).includes($preferredAction)) { @@ -49,7 +49,7 @@ label={labels[method]} on:click={() => { preferredAction.set(method); - dropDown.close(); + dropDown?.close(); }} /> {/each}