mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Fix defineErrorMessage
which is not actually using the msg
variable it creates
This commit is contained in:
parent
6d20c85e91
commit
249468d154
1 changed files with 3 additions and 2 deletions
|
@ -1095,11 +1095,12 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
defineErrorMessage(errObject) {
|
defineErrorMessage(errObject) {
|
||||||
|
let msg;
|
||||||
if (errObject.response) {
|
if (errObject.response) {
|
||||||
let msg = errObject.response.data.message ? errObject.response.data.message : 'An unexpected error occured.';
|
msg = errObject.response.data.message ? errObject.response.data.message : 'An unexpected error occured.';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let msg = errObject.message;
|
msg = errObject.message;
|
||||||
}
|
}
|
||||||
return swal('Oops, something went wrong!', msg, 'error');
|
return swal('Oops, something went wrong!', msg, 'error');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue