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
This commit is contained in:
Iván Ovejero 2023-07-19 12:08:43 +02:00 committed by GitHub
parent 81e98e82fd
commit c7b74c3c1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -674,6 +674,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;