From 6519a74de44f74d2ab6a921c5b252e134d2e2258 Mon Sep 17 00:00:00 2001 From: Eugen Istoc Date: Tue, 8 Jul 2025 04:51:34 -0400 Subject: [PATCH] fix(useOverlay): improve props handling by merging existing and new (#4478) --- src/runtime/composables/useOverlay.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/composables/useOverlay.ts b/src/runtime/composables/useOverlay.ts index 9e81ed31..305b6066 100644 --- a/src/runtime/composables/useOverlay.ts +++ b/src/runtime/composables/useOverlay.ts @@ -71,7 +71,7 @@ function _useOverlay() { isMounted: !!defaultOpen, destroyOnClose: !!destroyOnClose, originalProps: props || {}, - props: { ...(props || {}) } + props: { ...props } }) overlays.push(options) @@ -135,7 +135,7 @@ function _useOverlay() { const patch = (id: symbol, props: Partial>): void => { const overlay = getOverlay(id) - overlay.props = { ...props } + overlay.props = { ...overlay.props, ...props } } const getOverlay = (id: symbol): Overlay => {