improper save for conditions

This commit is contained in:
ari committed 2022-05-18 22:41:24 -04:00
1 parent c28796872f
commit 42ab6e5913
1 file changed
+2 -2
@@ -130,12 +130,12 @@ export const useMultiNodeEditorState = (props: MultiNodeEditorProps) => {
})
},
onClose() {
if (!multiNode.isSaved) {
if (!multiNode.isSaved && multiNode.isModified) {
if (!window.confirm("You haven't saved your work, are you ok with losing it?")) {
return
}
props.onSave && props.onSave(slides)
}
props.onSave && props.onSave(slides)
props.onClose && props.onClose()
}
}