2
0

🐛 (typebot) Make sure old typebot properties are removed when pulled

This commit is contained in:
Baptiste Arnaud
2023-02-19 07:38:41 +01:00
parent c32aadc95b
commit d22cc45a97
2 changed files with 15 additions and 5 deletions

View File

@ -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
}