mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-19 21:04:33 +08:00
🩹 Fix crash on bot load when it has no groups
This commit is contained in:
parent
ff04edf139
commit
bf1fbf2c53
@ -54,7 +54,9 @@ export const Graph = ({
|
||||
} = useGraph()
|
||||
const { updateGroupCoordinates } = useGroupsCoordinates()
|
||||
const [graphPosition, setGraphPosition] = useState(
|
||||
graphPositionDefaultValue(typebot.groups[0]?.graphCoordinates)
|
||||
graphPositionDefaultValue(
|
||||
typebot.groups.at(0)?.graphCoordinates ?? { x: 0, y: 0 }
|
||||
)
|
||||
)
|
||||
const [debouncedGraphPosition] = useDebounce(graphPosition, 200)
|
||||
const transform = useMemo(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user