From ff8a2c5704f6a93e505044469d00e46e070306c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 19 Jul 2023 12:08:43 +0200 Subject: [PATCH] fix(editor): Ensure default credential values are not detected as dirty state (#6677) * fix(editor): Ensure default credential values are not detected as dirty state * chore: Remove logging * refactor: Improve comment --- .../editor-ui/src/components/CredentialEdit/CredentialEdit.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue index 02dcf89a8a522..385e4f10504c4 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue @@ -670,6 +670,9 @@ export default defineComponent({ }, // eslint-disable-next-line @typescript-eslint/no-explicit-any onDataChange({ name, value }: { name: string; value: any }) { + // skip update if new value matches the current + if (this.credentialData[name] === value) return; + this.hasUnsavedChanges = true; const { oauthTokenData, ...credData } = this.credentialData;