fix: broken production build due to isDemo() check

This commit is contained in:
Phan An 2022-10-26 23:48:44 +02:00
parent 8bcc671ed1
commit b7e8949a1a
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View file

@ -40,4 +40,7 @@ export const copyText = (text: string): void => {
document.execCommand('copy')
}
export const isDemo = () => import.meta.env.VITE_KOEL_ENV === 'demo'
export const isDemo = () => {
// can't use one-liner as it would break production build with an "Unexpected token" error
return import.meta.env.VITE_KOEL_ENV === 'demo'
}