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/stores/media-store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/web/src/stores/media-store.ts') diff --git a/apps/web/src/stores/media-store.ts b/apps/web/src/stores/media-store.ts index 76cdd638..dc9ad90d 100644 --- a/apps/web/src/stores/media-store.ts +++ b/apps/web/src/stores/media-store.ts @@ -1,6 +1,7 @@ import { create } from "zustand"; import { storageService } from "@/lib/storage/storage-service"; import { useTimelineStore } from "./timeline-store"; +import { generateUUID } from "@/lib/utils"; export type MediaType = "image" | "video" | "audio"; @@ -161,7 +162,7 @@ export const useMediaStore = create((set, get) => ({ addMediaItem: async (projectId, item) => { const newItem: MediaItem = { ...item, - id: crypto.randomUUID(), + id: generateUUID(), }; // Add to local state immediately for UI responsiveness -- cgit v1.3.1