From d54f07850e3e517eec43d9440b0e92aa2d4dff32 Mon Sep 17 00:00:00 2001 From: Keep Creating Online <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:17:36 -0500 Subject: [PATCH] fixed bug when editing older videos without the needed fields --- src/js/nostr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/nostr.js b/src/js/nostr.js index 70119b1..1053609 100644 --- a/src/js/nostr.js +++ b/src/js/nostr.js @@ -47,8 +47,8 @@ function convertEventToVideo(event) { const content = JSON.parse(event.content || "{}"); return { id: event.id, - // We store a 'videoRootId' in content so we can group multiple edits - videoRootId: content.videoRootId || null, + // If content.videoRootId is missing, use event.id as a fallback + videoRootId: content.videoRootId || event.id, version: content.version ?? 1, isPrivate: content.isPrivate ?? false, title: content.title || "",