Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a88112a

Browse files
authored
Fix issue with dispatch happening mid-dispatch due to js-sdk emit (#8473)
1 parent dc9ec85 commit a88112a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/actions/MatrixActionCreators.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ function addMatrixClientListener(
282282
const listener: Listener = (...args) => {
283283
const payload = actionCreator(matrixClient, ...args);
284284
if (payload) {
285-
dis.dispatch(payload, true);
285+
// Consumers shouldn't have to worry about calling js-sdk methods mid-dispatch, so make this dispatch async
286+
dis.dispatch(payload, false);
286287
}
287288
};
288289
matrixClient.on(eventName, listener);

0 commit comments

Comments
 (0)