chore: fix infinite rerender

This commit is contained in:
a7m-1st 2026-02-05 19:52:44 +03:00
parent 6189fd822c
commit 1daca2963d

View file

@ -523,6 +523,17 @@ const projectStore = create<ProjectStore>()((set, get) => ({
//TODO: For now handle the question as unique identifier to avoid duplicate
if (!projectId) projectId = 'Replay: ' + question;
if (!taskIds || taskIds.length === 0) {
console.warn('[ProjectStore] No taskIds provided for replayProject');
return createProject(
`Replay Project ${question}`,
`No tasks to replay`,
projectId,
ProjectType.NORMAL,
historyId
);
}
// If projectId is provided, reset that project
if (projectId) {
if (projects[projectId]) {