diff options
| author | Sanjit K <skomputeruser@gmail.com> | 2025-07-12 00:14:03 -0500 |
|---|---|---|
| committer | Sanjit K <skomputeruser@gmail.com> | 2025-07-12 00:14:03 -0500 |
| commit | 799fd2981abe010a5e4362b5c64951be5d0902c0 (patch) | |
| tree | f31d608bdbe681a7b0090929af4230aa94083049 /apps/web/src/types | |
| parent | fd017d6aca1a17edc4614b4bf07091eb41f8d310 (diff) | |
| download | opencut-799fd2981abe010a5e4362b5c64951be5d0902c0.tar.gz | |
fixed: [BUG] crypto.randomUUID is not a function Runtime Error #205. Added fallback function with manual UUID generation if crypto.randomUUID() was not available.
Diffstat (limited to 'apps/web/src/types')
| -rw-r--r-- | apps/web/src/types/timeline.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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: [], |
