fix(identity): reset person when identityName is undefined

Solves #1794
This commit is contained in:
Massedil
2025-06-19 16:17:05 +02:00
parent 77a05ac862
commit e606c104c0

View File

@@ -265,7 +265,10 @@ onPersonResult(async ({ data }) => {
onPersonError((err) => handleErrors(err as unknown as AbsintheGraphQLErrors));
const person = computed(() => personResult.value?.fetchPerson);
const person = computed(() =>
// person should be undefined if we are on the creation form and defined if we are on the edit form
props.identityName !== undefined ? personResult.value?.fetchPerson : undefined
);
const baseIdentity: IPerson = {
id: undefined,