mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Converted global to globalThis.
This commit is contained in:
parent
886b7e9e56
commit
c969603001
9 changed files with 25 additions and 22 deletions
|
|
@ -7,12 +7,12 @@ function getClient() {
|
|||
const redis = new UmamiRedisClient(process.env.REDIS_URL);
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
global[REDIS] = redis;
|
||||
globalThis[REDIS] = redis;
|
||||
}
|
||||
|
||||
return redis;
|
||||
}
|
||||
|
||||
const client = global[REDIS] || getClient();
|
||||
const client = globalThis[REDIS] || getClient();
|
||||
|
||||
export default { client, enabled };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue