Skip to content

Commit

Permalink
chore(utilities): avoid crashing in node environments due to import.m…
Browse files Browse the repository at this point in the history
…eta.env access
  • Loading branch information
kleinfreund committed Jan 18, 2025
1 parent c274b72 commit c92fd58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utilities/log.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ScoreValue } from '#lib/types.js'

export const log = import.meta.env.VITE_DEBUG === 'true' ? logFn : () => undefined
export const log = import.meta.env?.VITE_DEBUG === 'true' ? logFn : () => undefined

function logFn ({ chips, multiplier, phase, card, joker, type, trigger }: ScoreValue): void {
let valueStr = ''
Expand Down

0 comments on commit c92fd58

Please sign in to comment.