2
0

🐛 (ga) Fix value field parsing

This commit is contained in:
Baptiste Arnaud
2023-05-05 13:21:04 -04:00
parent dd079c3525
commit e15e27f0b4

View File

@@ -1,5 +1,6 @@
import { ExecuteIntegrationResponse } from '@/features/chat/types' import { ExecuteIntegrationResponse } from '@/features/chat/types'
import { deepParseVariables } from '@/features/variables/deepParseVariable' import { deepParseVariables } from '@/features/variables/deepParseVariable'
import { isNotEmpty } from '@typebot.io/lib'
import { GoogleAnalyticsBlock, SessionState } from '@typebot.io/schemas' import { GoogleAnalyticsBlock, SessionState } from '@typebot.io/schemas'
export const executeGoogleAnalyticsBlock = ( export const executeGoogleAnalyticsBlock = (
@@ -14,7 +15,9 @@ export const executeGoogleAnalyticsBlock = (
{ {
googleAnalytics: { googleAnalytics: {
...googleAnalytics, ...googleAnalytics,
value: Number(googleAnalytics.value), value: isNotEmpty(googleAnalytics.value as string)
? Number(googleAnalytics.value)
: undefined,
}, },
lastBubbleBlockId, lastBubbleBlockId,
}, },