2
0

🐛 Wipe chat state from storage if disabled

Closes #1429
This commit is contained in:
Baptiste Arnaud
2024-04-11 12:07:33 +02:00
parent f5508701fc
commit 7d6cf2ad54
4 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.2.68",
"version": "0.2.69",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",

View File

@ -146,6 +146,7 @@ export const Bot = (props: BotProps & { class?: string }) => {
}
props.onChatStatePersisted?.(true)
} else {
wipeExistingChatStateInStorage(data.typebot.id)
setInitialChatReply(data)
if (data.input?.id && props.onNewInputBlock)
props.onNewInputBlock(data.input)