Skip to content

Commit

Permalink
Merge pull request #27685 from element-hq/t3chguy/fix-init-unsafe-code
Browse files Browse the repository at this point in the history
Ensure we do not load matrix-react-sdk is a manner which can white-screen
  • Loading branch information
t3chguy authored Jul 9, 2024
2 parents 6452f27 + 9955321 commit 3091db7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vector/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ limitations under the License.
*/

import { logger } from "matrix-js-sdk/src/logger";
import { extractErrorMessageFromError } from "matrix-react-sdk/src/components/views/dialogs/ErrorDialog";

// These are things that can run before the skin loads - be careful not to reference the react-sdk though.
import { parseQsFromFragment } from "./url_utils";
Expand Down Expand Up @@ -120,6 +119,7 @@ async function start(): Promise<void> {
showError,
showIncompatibleBrowser,
_t,
extractErrorMessageFromError,
} = await import(
/* webpackChunkName: "init" */
/* webpackPreload: true */
Expand Down
2 changes: 2 additions & 0 deletions src/vector/init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ export async function loadModules(): Promise<void> {
}

export { _t } from "../languageHandler";

export { extractErrorMessageFromError } from "matrix-react-sdk/src/components/views/dialogs/ErrorDialog";

0 comments on commit 3091db7

Please sign in to comment.