Browse Source

chore: Remove duplicate checks for bad contact methods.

get-get-hash
Trent Larson 1 week ago
parent
commit
984244117b
  1. 16
      src/views/ContactEditView.vue

16
src/views/ContactEditView.vue

@ -239,21 +239,7 @@ export default class ContactEditView extends Vue {
this.contact = contact; this.contact = contact;
this.contactName = contact.name || ""; this.contactName = contact.name || "";
this.contactNotes = contact.notes || ""; this.contactNotes = contact.notes || "";
this.contactMethods = contact.contactMethods || [];
// Ensure contactMethods is a valid array of ContactMethod objects
if (Array.isArray(contact.contactMethods)) {
this.contactMethods = contact.contactMethods.filter((method) => {
return (
method &&
typeof method === "object" &&
typeof method.label === "string" &&
typeof method.type === "string" &&
typeof method.value === "string"
);
});
} else {
this.contactMethods = [];
}
} else { } else {
this.notify.error( this.notify.error(
`${NOTIFY_CONTACT_NOT_FOUND.message} ${contactDid}`, `${NOTIFY_CONTACT_NOT_FOUND.message} ${contactDid}`,

Loading…
Cancel
Save