Skip to content

Commit e405be9

Browse files
committed
fix: await queued up actions
1 parent de5a167 commit e405be9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/src/contexts/overlayContext/OverlayProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ const finalizeCloseOverlay = () => overlayStore.partialNext(DefaultState);
178178

179179
export const overlayStore = new StateStore<OverlayState>(DefaultState);
180180

181-
overlayStore.subscribeWithSelector(s, ({ active }) => {
181+
overlayStore.subscribeWithSelector(s, async ({ active }) => {
182182
if (!active) {
183183
// flush the queue
184184
for (const action of actionQueue) {
185-
action();
185+
await action();
186186
}
187187

188188
actionQueue = [];

0 commit comments

Comments
 (0)