From 2a9e31a5aa1889671f339718aba8a4be444306cd Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Fri, 23 Jan 2026 22:18:31 -0800 Subject: [PATCH] Use VueUse unrefElement --- src/components/actionbar/ComfyActionbar.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/actionbar/ComfyActionbar.vue b/src/components/actionbar/ComfyActionbar.vue index c3f082b28..11435bd7e 100644 --- a/src/components/actionbar/ComfyActionbar.vue +++ b/src/components/actionbar/ComfyActionbar.vue @@ -60,6 +60,7 @@ import { useDraggable, useEventListener, useLocalStorage, + unrefElement, watchDebounced } from '@vueuse/core' import { clamp } from 'es-toolkit/compat' @@ -101,9 +102,10 @@ const isQueuePanelV2Enabled = computed(() => ) const panelRef = ref(null) -const panelElement = computed( - () => (panelRef.value?.$el as HTMLElement | undefined) ?? null -) +const panelElement = computed(() => { + const element = unrefElement(panelRef) + return element instanceof HTMLElement ? element : null +}) const dragHandleRef = ref(null) const isDocked = useLocalStorage('Comfy.MenuPosition.Docked', true) const storedPosition = useLocalStorage('Comfy.MenuPosition.Floating', {