Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: Fix race condition in "double dialog" error check
useState() setters are async. c-podman and navigator call `Dialogs.close(); Dialogs.show(...)` in direct succession. In that case, Dialogs.show() does not yet see the updated `null` value for `dialog` and logs the error, which fails the test. To avoid that, use a ref for "is the dialog open", which is synchronous.
- Loading branch information