Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

Handle rename errors and prompt to save unsaved recordings

webadderall2872681ea6eb
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index f48489c6..5c1b760b 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -1704,12 +1704,11 @@ export default function VideoEditor() {
const hasUnsavedChanges = useMemo(
() =>
Boolean(
- currentProjectPath &&
- currentProjectSnapshot &&
- lastSavedSnapshot &&
- !areDeepEqual(currentProjectSnapshot, lastSavedSnapshot),
+ currentProjectSnapshot &&
+ (!lastSavedSnapshot ||
+ !areDeepEqual(currentProjectSnapshot, lastSavedSnapshot)),
),
- [currentProjectPath, currentProjectSnapshot, lastSavedSnapshot],
+ [currentProjectSnapshot, lastSavedSnapshot],
);
useEffect(() => {
@@ -2319,6 +2318,8 @@ export default function VideoEditor() {
let saved = false;
try {
saved = await saveProjectWithName(trimmedProjectName);
+ } catch (error) {
+ toast.error(getErrorMessage(error));
} finally {
setIsSavingProjectName(false);
}