2
0

⬆️ Upgrade dependencies

This commit is contained in:
Baptiste Arnaud
2022-11-21 19:08:14 +01:00
parent b29f7325ad
commit 34cfd1db30
35 changed files with 674 additions and 739 deletions

View File

@ -139,9 +139,9 @@ const useUndo = <T extends { updatedAt: string } | undefined>(
const set = useCallback(
(newPresent: T | ((current: T) => T), options = { updateDate: true }) => {
const updatedTypebot =
newPresent && 'id' in newPresent
? newPresent
: (newPresent as (current: T) => T)(presentRef.current)
newPresent && typeof newPresent === 'function'
? newPresent(presentRef.current)
: newPresent
presentRef.current = updatedTypebot
dispatch({
type: ActionType.Set,