Correctly fill window.matrixChat even when a Wrapper module is active (#26395)
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
This commit is contained in:
parent
f1a39b3e4d
commit
0040181489
4 changed files with 16 additions and 6 deletions
|
@ -30,6 +30,7 @@ import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
|||
import { setTheme } from "matrix-react-sdk/src/theme";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { ModuleRunner } from "matrix-react-sdk/src/modules/ModuleRunner";
|
||||
import MatrixChat from "matrix-react-sdk/src/components/structures/MatrixChat";
|
||||
|
||||
import ElectronPlatform from "./platform/ElectronPlatform";
|
||||
import PWAPlatform from "./platform/PWAPlatform";
|
||||
|
@ -147,7 +148,10 @@ export async function loadApp(fragParams: {}): Promise<void> {
|
|||
/* webpackPreload: true */
|
||||
"./app"
|
||||
);
|
||||
window.matrixChat = ReactDOM.render(await module.loadApp(fragParams), document.getElementById("matrixchat"));
|
||||
function setWindowMatrixChat(matrixChat: MatrixChat): void {
|
||||
window.matrixChat = matrixChat;
|
||||
}
|
||||
ReactDOM.render(await module.loadApp(fragParams, setWindowMatrixChat), document.getElementById("matrixchat"));
|
||||
}
|
||||
|
||||
export async function showError(title: string, messages?: string[]): Promise<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue