saving colors when not modified

This commit is contained in:
ari committed 2022-05-19 23:22:16 -04:00
1 parent 7afda7eb1c
commit 48decb2e16
2 files changed
+11 -2

No files matched your search

+7 -1
View File
@@ -66,7 +66,13 @@ export const NodeEditor: FC<NodeEditorProps> = ({
<Button
className="node-editor--footer--save"
onClick={() => {
areYouSureNotReady('save') && onSave(state.data)
if (areYouSureNotReady('save')) {
if (JSON.stringify(state.data) !== JSON.stringify(node)) {
onSave(state.data)
} else {
onClose()
}
}
}}
title={
!isReady ? "Some fields have not been properly filled up" : ""