diff --git a/src/modules/contacts/components/contact-popup.vue b/src/modules/contacts/components/contact-popup.vue index 82a37b9..99292ff 100644 --- a/src/modules/contacts/components/contact-popup.vue +++ b/src/modules/contacts/components/contact-popup.vue @@ -151,13 +151,15 @@ async function loadItem(id = props.id) { draft.value = await ContactsAPI.get({ itemId: id }); } -watch(() => props.shown, () => { - if (props.id) loadItem(props.id); - else { - draft.value = generateNewDraft(); - setDefaultManager(); +watch(() => props.shown, (value) => { + if(value) { + if (props.id) loadItem(props.id); + else { + draft.value = generateNewDraft(); + setDefaultManager(); + } } -}, { immediate: true }); +});