1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Fix account & room settings race condition (#7953)

This commit is contained in:
Michael Telatynski
2022-03-03 22:09:06 +00:00
committed by GitHub
parent b8f37a46f0
commit afbe3d16b4
6 changed files with 169 additions and 122 deletions

View File

@ -20,6 +20,7 @@ import dis from '../../src/dispatcher/dispatcher';
import { makeType } from "../../src/utils/TypeUtils";
import { ValidatedServerConfig } from "../../src/utils/AutoDiscoveryUtils";
import { EnhancedMap } from "../../src/utils/maps";
import MatrixClientBackedSettingsHandler from "../../src/settings/handlers/MatrixClientBackedSettingsHandler";
/**
* Stub out the MatrixClient, and configure the MatrixClientPeg object to
@ -44,6 +45,7 @@ export function stubClient() {
// MatrixClientPeg.get() is called a /lot/, so implement it with our own
// fast stub function rather than a sinon stub
peg.get = function() { return client; };
MatrixClientBackedSettingsHandler.matrixClient = client;
}
/**