🔊 Log incoming data to investigate inconsistency
This commit is contained in:
@ -161,6 +161,13 @@ export const TypebotContext = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!typebot || !currentTypebotRef.current) return
|
if (!typebot || !currentTypebotRef.current) return
|
||||||
|
if (
|
||||||
|
dequal(
|
||||||
|
omit(typebot, 'updatedAt'),
|
||||||
|
omit(currentTypebotRef.current, 'updatedAt')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return
|
||||||
if (typebotId !== currentTypebotRef.current.id) {
|
if (typebotId !== currentTypebotRef.current.id) {
|
||||||
setLocalTypebot({ ...typebot })
|
setLocalTypebot({ ...typebot })
|
||||||
flush()
|
flush()
|
||||||
@ -168,6 +175,12 @@ export const TypebotContext = ({
|
|||||||
new Date(typebot.updatedAt) >
|
new Date(typebot.updatedAt) >
|
||||||
new Date(currentTypebotRef.current.updatedAt)
|
new Date(currentTypebotRef.current.updatedAt)
|
||||||
) {
|
) {
|
||||||
|
console.log(
|
||||||
|
'Incoming typebot',
|
||||||
|
typebot,
|
||||||
|
'Current typebot',
|
||||||
|
currentTypebotRef.current
|
||||||
|
)
|
||||||
setLocalTypebot({ ...typebot })
|
setLocalTypebot({ ...typebot })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user