Skip to content

Commit

Permalink
🐛 Fix persistence issue when user remembered
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Sep 25, 2024
1 parent 12fdfe7 commit ec24db2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/embeds/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.3.15",
"version": "0.3.16",
"description": "Javascript library to display typebots on your website",
"license": "AGPL-3.0-or-later",
"type": "module",
Expand Down
2 changes: 2 additions & 0 deletions packages/embeds/js/src/utils/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export function persist<T>(
const serialize: (data: T) => string = (data: T) => {
const clonedData = JSON.parse(JSON.stringify(data));

if (typeof clonedData !== "object") return JSON.stringify(clonedData);

if ("blobUrl" in clonedData) {
clonedData.blobUrl = undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.3.15",
"version": "0.3.16",
"license": "AGPL-3.0-or-later",
"description": "Convenient library to display typebots on your Next.js website",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.3.15",
"version": "0.3.16",
"description": "Convenient library to display typebots on your React app",
"license": "AGPL-3.0-or-later",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"globalPassThroughEnv": ["ENCRYPTION_SECRET"],
"tasks": {
"dev": {
"dependsOn": ["^db:generate", "@typebot.io/react#build"],
"dependsOn": ["^db:generate", "^db:push", "@typebot.io/react#build"],
"persistent": true
},
"build": {
Expand Down

0 comments on commit ec24db2

Please sign in to comment.