-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 (typebot) Make sure old typebot properties are removed when pulled
- Loading branch information
1 parent
c32aadc
commit d22cc45
Showing
2 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
apps/builder/src/features/typebot/api/utils/removeTypebotOldProperties.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { omit } from 'utils' | ||
|
||
export const removeTypebotOldProperties = (data: unknown) => { | ||
if (!data || typeof data !== 'object') return data | ||
if ('publishedTypebotId' in data) { | ||
return omit(data, 'publishedTypebotId') | ||
} | ||
return data | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters