about summary refs log tree commit diff
path: root/src/components/Dialog/context.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Dialog/context.ts')
-rw-r--r--src/components/Dialog/context.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/components/Dialog/context.ts b/src/components/Dialog/context.ts
index df8bbb081..859f8edd7 100644
--- a/src/components/Dialog/context.ts
+++ b/src/components/Dialog/context.ts
@@ -39,8 +39,7 @@ export function useDialogControl(): DialogOuterProps['control'] {
         control.current.open()
       },
       close: cb => {
-        control.current.close()
-        cb?.()
+        control.current.close(cb)
       },
     }),
     [id, control],