From 6b02935116a4cb0566770f1c39ab49394464e89f Mon Sep 17 00:00:00 2001 From: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Date: Mon, 21 Feb 2022 06:52:45 +0800 Subject: [PATCH] fix translations resetting for new records (#11746) --- app/src/interfaces/translations/translations.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/interfaces/translations/translations.vue b/app/src/interfaces/translations/translations.vue index 31b4ad41e9..384e02d35b 100644 --- a/app/src/interfaces/translations/translations.vue +++ b/app/src/interfaces/translations/translations.vue @@ -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();