2
0

🐛 (typebot) Attempt to fix updatedAt comparison with different timezones

Closes #327
This commit is contained in:
Baptiste Arnaud
2023-02-20 15:52:31 +01:00
parent 0ff6f76239
commit 6c2df1a474
2 changed files with 5 additions and 3 deletions

View File

@ -156,8 +156,8 @@ export const TypebotProvider = ({
setLocalTypebot({ ...typebot }, { updateDate: false })
flush()
} else if (
new Date(typebot.updatedAt) >
new Date(currentTypebotRef.current.updatedAt)
new Date(typebot.updatedAt).getTime() >
new Date(currentTypebotRef.current.updatedAt).getTime()
) {
setLocalTypebot({ ...typebot })
}