Converted global to globalThis.

This commit is contained in:
Mike Cao 2025-04-28 23:05:18 -07:00
parent 886b7e9e56
commit c969603001
9 changed files with 25 additions and 22 deletions

View file

@ -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 };