You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-07 23:02:56 +03:00
Use globalThis instead of global (#3763)
Switches use of `global` to `globalThis`, which is better supported when building with modern build tools like Vite. Refs #2903 Signed-off-by: Damon Vestervand <damon@beyondwork.ai> Signed-off-by: Damon <damon@vestervand.net>
This commit is contained in:
committed by
GitHub
parent
ff53557957
commit
66251e0855
@@ -20,7 +20,7 @@ import { logger } from "../src/logger";
|
||||
// try to load the olm library.
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
global.Olm = require("@matrix-org/olm");
|
||||
globalThis.Olm = require("@matrix-org/olm");
|
||||
logger.log("loaded libolm");
|
||||
} catch (e) {
|
||||
logger.warn("unable to run crypto tests: libolm not available", e);
|
||||
|
Reference in New Issue
Block a user