We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bfdebb commit 587123eCopy full SHA for 587123e
1 file changed
apps/cowswap-frontend/src/appzi.ts
@@ -73,13 +73,13 @@ type AppziSettings = {
73
}
74
75
function initialize(): void {
76
- if (isAppziEnabled) {
77
- ReactAppzi.initialize(APPZI_TOKEN)
+ if (!isAppziEnabled || typeof window === 'undefined') return
78
79
- if (typeof window !== 'undefined') {
80
- window.appziSettings = window.appziSettings || {}
81
- }
82
+ window.appziSettings = window.appziSettings || {}
+
+ try {
+ ReactAppzi.initialize(APPZI_TOKEN)
+ } catch {}
83
84
85
function updateAppziSettings({ data = {}, userId = '' }: AppziSettings): void {
0 commit comments