mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-13 21:02:56 +08:00
🐛 Fix buttons invalid reply when internal value is empty string
This commit is contained in:
parent
abde4227c3
commit
79254cb910
@ -11,6 +11,7 @@ type Props = {
|
||||
newVariables: VariableWithUnknowValue[];
|
||||
currentBlockId: string | undefined;
|
||||
};
|
||||
// TODO: Refacto newVariables param first, other in second
|
||||
export const updateVariablesInSession = ({
|
||||
state,
|
||||
newVariables,
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -32,7 +32,7 @@ export const Buttons = (props: Props) => {
|
||||
|
||||
props.onSubmit({
|
||||
type: "text",
|
||||
value: value ?? content ?? "",
|
||||
value: value || content || "",
|
||||
label: value ? content : undefined,
|
||||
});
|
||||
};
|
||||
|
||||
@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user