fix(web): modal race condition (#19625)

* fix(web): modal race condition

* fix: translation

* fix: translation
This commit is contained in:
Daimolean 2025-07-01 03:33:47 +08:00 committed by GitHub
parent 181a7e115f
commit 53020852ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 51 deletions

View file

@ -27,7 +27,7 @@ class ModalManager {
const deferred = new Promise<StripValueIfOptional<K>>((resolve) => {
onClose = async (...args: [StripValueIfOptional<K>]) => {
await unmount(modal);
resolve(args?.[0]);
setTimeout(() => resolve(args?.[0]), 0);
};
modal = mount(Component, {