🐛 (transcript) Fix variable ids for history detection
This commit is contained in:
@ -23,7 +23,6 @@ import {
|
|||||||
} from '@typebot.io/schemas/features/blocks/logic/setVariable/constants'
|
} from '@typebot.io/schemas/features/blocks/logic/setVariable/constants'
|
||||||
import { createCodeRunner } from '@typebot.io/variables/codeRunners'
|
import { createCodeRunner } from '@typebot.io/variables/codeRunners'
|
||||||
import { stringifyError } from '@typebot.io/lib/stringifyError'
|
import { stringifyError } from '@typebot.io/lib/stringifyError'
|
||||||
import { AnswerV2 } from '@typebot.io/prisma'
|
|
||||||
|
|
||||||
export const executeSetVariable = async (
|
export const executeSetVariable = async (
|
||||||
state: SessionState,
|
state: SessionState,
|
||||||
|
@ -127,7 +127,7 @@ export const getVariablesToParseInfoInText = (
|
|||||||
if (isNotDefined(match.index) || !match[0].length) return
|
if (isNotDefined(match.index) || !match[0].length) return
|
||||||
const matchedVarName = match[1] ?? match[3]
|
const matchedVarName = match[1] ?? match[3]
|
||||||
const variable = variables.find((variable) => {
|
const variable = variables.find((variable) => {
|
||||||
return matchedVarName === variable.name && isDefined(variable.value)
|
return matchedVarName === variable.name
|
||||||
}) as VariableWithValue | undefined
|
}) as VariableWithValue | undefined
|
||||||
variablesToParseInfo.push({
|
variablesToParseInfo.push({
|
||||||
startIndex: match.index,
|
startIndex: match.index,
|
||||||
|
Reference in New Issue
Block a user