From 799fd2981abe010a5e4362b5c64951be5d0902c0 Mon Sep 17 00:00:00 2001 From: Sanjit K Date: Sat, 12 Jul 2025 00:14:03 -0500 Subject: fixed: [BUG] crypto.randomUUID is not a function Runtime Error #205. Added fallback function with manual UUID generation if crypto.randomUUID() was not available. --- apps/web/src/types/timeline.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/web/src/types') diff --git a/apps/web/src/types/timeline.ts b/apps/web/src/types/timeline.ts index a759de21..17dbb5d1 100644 --- a/apps/web/src/types/timeline.ts +++ b/apps/web/src/types/timeline.ts @@ -1,4 +1,5 @@ import { MediaType } from "@/stores/media-store"; +import { generateUUID } from "@/lib/utils"; export type TrackType = "media" | "text" | "audio"; @@ -111,7 +112,7 @@ export function ensureMainTrack(tracks: TimelineTrack[]): TimelineTrack[] { if (!hasMainTrack) { // Create main track if it doesn't exist const mainTrack: TimelineTrack = { - id: crypto.randomUUID(), + id: generateUUID(), name: "Main Track", type: "media", elements: [], -- cgit v1.3.1