Fix data model edits tracking (#8567)

This commit is contained in:
ian
2021-10-06 00:07:23 +08:00
committed by GitHub
parent 887c97b8c2
commit bb78a49072

View File

@@ -142,7 +142,10 @@ export default defineComponent({
collection
);
const hasEdits = computed<boolean>(() => Object.keys(edits.value).length > 0);
const hasEdits = computed<boolean>(() => {
if (!edits.value.meta) return false;
return Object.keys(edits.value.meta).length > 0;
});
useShortcut('meta+s', () => {
if (hasEdits.value) saveAndStay();