fix translations resetting for new records (#11746)

This commit is contained in:
Azri Kahar
2022-02-21 06:52:45 +08:00
committed by GitHub
parent b8742a479f
commit 6b02935116

View File

@@ -298,8 +298,8 @@ export default defineComponent({
}
if (!newVal && oldVal) return; // when user clears whole translations value
if (newVal && newVal.some((item) => typeof item === 'object') && oldVal) return; // when there's any new edits since edits are objects
if (isEqual(newVal, oldVal)) return; // when user unfocus/blur inputs so they will be equal
if (newVal?.some((item) => typeof item === 'object')) return; // when there's any new edits since edits are objects
if (newVal?.some((item) => typeof item === 'object') && isEqual(newVal, oldVal)) return; // when user unfocus/blur inputs so they will be equal
if (isUndo.value) return; // when user undo to the original value
loadItems();