diff --git a/src/runtime/composables/useOverlay.ts b/src/runtime/composables/useOverlay.ts index 685b5220..2a22b451 100644 --- a/src/runtime/composables/useOverlay.ts +++ b/src/runtime/composables/useOverlay.ts @@ -46,7 +46,7 @@ function _useOverlay() { isMounted: !!defaultOpen, destroyOnClose: !!destroyOnClose, originalProps: props || {}, - props: {} + props: { ...(props || {}) } }) overlays.push(options) @@ -110,9 +110,7 @@ function _useOverlay() { const patch = (id: symbol, props: Partial>): void => { const overlay = getOverlay(id) - Object.entries(props!).forEach(([key, value]) => { - (overlay.props as any)[key] = value - }) + overlay.props = { ...props } } const getOverlay = (id: symbol): Overlay => {