diff --git a/src/packages/notify/notify.tsx b/src/packages/notify/notify.tsx index aacb7091a4..3ceb6406a6 100644 --- a/src/packages/notify/notify.tsx +++ b/src/packages/notify/notify.tsx @@ -35,8 +35,11 @@ function getInstance( function notice(opts: any) { opts = { ...options, ...opts } - getInstance(opts, (notification: any) => { - messageInstance = notification + return new Promise((resolve) => { + getInstance(opts, (notification: any) => { + messageInstance = notification + resolve() + }) }) }