🐛 Fix buttons invalid reply when internal value is empty string

This commit is contained in:
Baptiste Arnaud 2025-05-05 10:21:26 +02:00
parent abde4227c3
commit 79254cb910
No known key found for this signature in database
6 changed files with 6 additions and 5 deletions

View File

@ -11,6 +11,7 @@ type Props = {
newVariables: VariableWithUnknowValue[];
currentBlockId: string | undefined;
};
// TODO: Refacto newVariables param first, other in second
export const updateVariablesInSession = ({
state,
newVariables,

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.3.85",
"version": "0.3.86",
"description": "Javascript library to display typebots on your website",
"license": "FSL-1.1-ALv2",
"type": "module",

View File

@ -32,7 +32,7 @@ export const Buttons = (props: Props) => {
props.onSubmit({
type: "text",
value: value ?? content ?? "",
value: value || content || "",
label: value ? content : undefined,
});
};

View File

@ -26,7 +26,7 @@ export const SinglePictureChoice = (props: Props) => {
if (!item) return;
return props.onSubmit({
type: "text",
label: isNotEmpty(item.title) ? item.title : (item.pictureSrc ?? item.id),
label: isNotEmpty(item.title) ? item.title : item.pictureSrc || item.id,
value: isNotEmpty(item.value) ? item.value : item.id,
});
};

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.3.85",
"version": "0.3.86",
"license": "FSL-1.1-ALv2",
"description": "Convenient library to display typebots on your Next.js website",
"type": "module",

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.3.85",
"version": "0.3.86",
"description": "Convenient library to display typebots on your React app",
"license": "FSL-1.1-ALv2",
"type": "module",