🐛 Fix variable buttons with new engine
This commit is contained in:
@@ -29,4 +29,4 @@ export const parseReactBotProps = ({ typebot, apiHost }: BotProps) => {
|
||||
return `${typebotLine} ${apiHostLine}`
|
||||
}
|
||||
|
||||
export const typebotImportUrl = `https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.9/dist/web.js`
|
||||
export const typebotImportUrl = `https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.10/dist/web.js`
|
||||
|
||||
@@ -3,4 +3,9 @@ import { ChoiceInputBlock } from 'models'
|
||||
export const validateButtonInput = (
|
||||
buttonBlock: ChoiceInputBlock,
|
||||
input: string
|
||||
) => buttonBlock.items.some((item) => item.content === input)
|
||||
) =>
|
||||
buttonBlock.items.some(
|
||||
(item) =>
|
||||
item.content === input ||
|
||||
(item.content?.startsWith('{{') && item.content.endsWith('}}'))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user