From 9cc77b4499023fa48b9a1abcb05a59c94fcfc4c5 Mon Sep 17 00:00:00 2001 From: Anwarul Islam Date: Tue, 15 Jul 2025 06:59:46 +0600 Subject: [PATCH] feat: enforce non-negative snap threshold and minimum grid interval in timeline store --- apps/web/src/stores/timeline-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.ts index b45f5507..2734903a 100644 --- a/apps/web/src/stores/timeline-store.ts +++ b/apps/web/src/stores/timeline-store.ts @@ -996,11 +996,11 @@ export const useTimelineStore = create((set, get) => { }, setSnapThreshold: (threshold) => { - set({ snapThreshold: threshold }); + set({ snapThreshold: Math.max(0, threshold) }); // Ensure non-negative threshold }, setGridInterval: (interval) => { - set({ gridInterval: interval }); + set({ gridInterval: Math.max(0.1, interval) }); // Ensure minimum interval }, }; });