Merge pull request #2848 from brkcvn/master

Error request controlled
This commit is contained in:
Burak Civan 2022-12-23 10:56:24 +03:00 committed by GitHub
commit defe00cc56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -493,10 +493,12 @@ export default class Form {
// Form fields check validation issue // Form fields check validation issue
onFail(error) { onFail(error) {
if (error.request) {
if (error.request.status == 419) { if (error.request.status == 419) {
window.location.href = ''; window.location.href = '';
return; return;
} }
}
if (typeof this.errors != "undefined") { if (typeof this.errors != "undefined") {
this.errors.record(error.response.data.errors); this.errors.record(error.response.data.errors);