Skip to content

Commit

Permalink
refactor: remove globalThis caching
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 31, 2023
1 parent e2e6aa6 commit 4e7b909
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 160 deletions.
3 changes: 1 addition & 2 deletions src/index.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function createConsola(options: Partial<ConsolaOptions> = {}) {
return consola;
}

export const consola = ((globalThis as any).consola =
(globalThis as any).consola || createConsola());
export const consola = createConsola();

export default consola;
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function _getDefaultLogLevel() {
return LogLevels.Info;
}

export const consola = ((globalThis as any).consola =
(globalThis as any).consola || createConsola());
export const consola = createConsola();

export default consola;
50 changes: 0 additions & 50 deletions src/utils/global.ts

This file was deleted.

106 changes: 0 additions & 106 deletions test/assign-reference.test.ts

This file was deleted.

0 comments on commit 4e7b909

Please sign in to comment.