diff options
Diffstat (limited to 'src/store/contacts.js')
-rw-r--r-- | src/store/contacts.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/store/contacts.js b/src/store/contacts.js index da47e067..5258d861 100644 --- a/src/store/contacts.js +++ b/src/store/contacts.js @@ -23,6 +23,7 @@ import Vue from 'vue' import ICAL from 'ical.js' import Contact from '../models/contact' +import validate from '../services/validate' const state = { // Using objects for performance @@ -78,6 +79,9 @@ const mutations = { addContact(state, contact) { if (contact instanceof Contact) { + // Checking contact validity 🙈 + validate(contact) + let sortedContact = { key: contact.key, value: contact[state.orderKey] |