diff --git a/frontend/src/store/project-store.ts b/frontend/src/store/project-store.ts index 20516ae..d35ba14 100644 --- a/frontend/src/store/project-store.ts +++ b/frontend/src/store/project-store.ts @@ -72,6 +72,9 @@ export const useProjectStore = create((set) => ({ appendToVariant: (newTokens: string, index: number) => set((state) => { const newVariants = [...state.variants]; + while (newVariants.length <= index) { + newVariants.push(""); + } newVariants[index] += newTokens; return { variants: newVariants }; }),