Skip to content

Commit 7d6cf2a

Browse files
committed
🐛 Wipe chat state from storage if disabled
Closes baptisteArno#1429
1 parent f550870 commit 7d6cf2a

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

packages/embeds/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/js",
3-
"version": "0.2.68",
3+
"version": "0.2.69",
44
"description": "Javascript library to display typebots on your website",
55
"type": "module",
66
"main": "dist/index.js",

packages/embeds/js/src/components/Bot.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export const Bot = (props: BotProps & { class?: string }) => {
146146
}
147147
props.onChatStatePersisted?.(true)
148148
} else {
149+
wipeExistingChatStateInStorage(data.typebot.id)
149150
setInitialChatReply(data)
150151
if (data.input?.id && props.onNewInputBlock)
151152
props.onNewInputBlock(data.input)

packages/embeds/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/nextjs",
3-
"version": "0.2.68",
3+
"version": "0.2.69",
44
"description": "Convenient library to display typebots on your Next.js website",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/embeds/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typebot.io/react",
3-
"version": "0.2.68",
3+
"version": "0.2.69",
44
"description": "Convenient library to display typebots on your React app",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)