mirror of
https://github.com/koreanbots/core.git
synced 2025-12-17 23:00:22 +00:00
fix: catching error for ga blocked
This commit is contained in:
parent
f94d436c2f
commit
fa6c3722be
@ -12,8 +12,11 @@ export function handlePWA(): boolean {
|
|||||||
if (window.navigator.standalone || window.matchMedia(mqStandAlone).matches) {
|
if (window.navigator.standalone || window.matchMedia(mqStandAlone).matches) {
|
||||||
displayMode = 'standalone'
|
displayMode = 'standalone'
|
||||||
}
|
}
|
||||||
window?.ga('set', 'dimension1', displayMode)
|
try {
|
||||||
|
window.ga('set', 'dimension1', displayMode)
|
||||||
|
} catch {
|
||||||
|
console.warn('GA Failed')
|
||||||
|
}
|
||||||
return displayMode === 'standalone'
|
return displayMode === 'standalone'
|
||||||
}
|
}
|
||||||
export function formatNumber(value: number):string {
|
export function formatNumber(value: number):string {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user