Merge pull request #2914 from EnesSacid-Buker/master
this.errors is undefined issue
This commit is contained in:
commit
6015e3a1e7
4
resources/assets/js/plugins/error.js
vendored
4
resources/assets/js/plugins/error.js
vendored
@ -17,14 +17,16 @@ export default class Errors {
|
||||
}
|
||||
|
||||
get(field) {
|
||||
if (this.errors[field]) {
|
||||
if (this.has(field)) {
|
||||
return this.errors[field][0];
|
||||
}
|
||||
}
|
||||
|
||||
record(errors) {
|
||||
if (errors instanceof Object) {
|
||||
this.errors = errors;
|
||||
}
|
||||
}
|
||||
|
||||
clear(field) {
|
||||
if (field) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user