Fix js errors

This commit is contained in:
Björn Fromme
2019-10-01 10:38:27 +02:00
parent c970920899
commit 2bcc3108e4
2 changed files with 6 additions and 4 deletions
@@ -175,8 +175,10 @@
class: 'alert-danger'
});
const violations = error.response.data.violations;
for (let violation of violations) {
this.formErrors[violation.property_path] = violation.message;
if (typeof violations !== 'undefined') {
for (let violation of violations) {
this.formErrors[violation.property_path] = violation.message;
}
}
});
}
@@ -20,7 +20,7 @@
export default {
methods: {
...mapMutations(['beginLoding', 'endLoading', 'alert']),
...mapMutations(['beginLoading', 'endLoading', 'alert']),
toggleReqistration () {
this.userData.newsletter = !this.userData.newsletter;
@@ -30,7 +30,7 @@
registration: this.userData.newsletter
};
this.beginLoding();
this.beginLoading();
const client = axios.create({
headers: {