mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
Converted global to globalThis.
This commit is contained in:
parent
886b7e9e56
commit
c969603001
9 changed files with 25 additions and 22 deletions
|
|
@ -41,7 +41,7 @@ function getClient() {
|
|||
});
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
global[CLICKHOUSE] = client;
|
||||
globalThis[CLICKHOUSE] = client;
|
||||
}
|
||||
|
||||
log('Clickhouse initialized');
|
||||
|
|
@ -219,7 +219,7 @@ async function findFirst(data: any[]) {
|
|||
|
||||
async function connect() {
|
||||
if (enabled && !clickhouse) {
|
||||
clickhouse = process.env.CLICKHOUSE_URL && (global[CLICKHOUSE] || getClient());
|
||||
clickhouse = process.env.CLICKHOUSE_URL && (globalThis[CLICKHOUSE] || getClient());
|
||||
}
|
||||
|
||||
return clickhouse;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue