Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix save prompt despite being saved

Siddharth279320d3efda
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index 7adc558e8..a89c43624 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -430,7 +430,7 @@ export default function VideoEditor() {
return false;
}
- const projectData = createProjectData(currentProjectMedia, {
+ const editorState = {
wallpaper,
shadowIntensity,
showBlur,
@@ -452,14 +452,17 @@ export default function VideoEditor() {
gifFrameRate,
gifLoop,
gifSizePreset,
- });
+ };
+ const projectData = createProjectData(currentProjectMedia, editorState);
const fileNameBase =
currentProjectMedia.screenVideoPath
.split(/[\\/]/)
.pop()
?.replace(/\.[^.]+$/, "") || `project-${Date.now()}`;
- const projectSnapshot = JSON.stringify(projectData);
+ // Match the normalization path used by `currentProjectSnapshot` so the
+ // post-save baseline compares equal and `hasUnsavedChanges` clears.
+ const projectSnapshot = createProjectSnapshot(currentProjectMedia, editorState);
const result = await window.electronAPI.saveProjectFile(
projectData,
fileNameBase,