this.errors is undefined
issue fixed
& fix typo
This commit is contained in:
parent
f46bd7f1ac
commit
1b9df65d69
6
resources/assets/js/plugins/error.js
vendored
6
resources/assets/js/plugins/error.js
vendored
@ -17,13 +17,15 @@ export default class Errors {
|
||||
}
|
||||
|
||||
get(field) {
|
||||
if (this.errors[field]) {
|
||||
if (this.has(field)) {
|
||||
return this.errors[field][0];
|
||||
}
|
||||
}
|
||||
|
||||
record(errors) {
|
||||
this.errors = errors;
|
||||
if (errors instanceof Object) {
|
||||
this.errors = errors;
|
||||
}
|
||||
}
|
||||
|
||||
clear(field) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user