xhr.json: properly pass failure callback to xhr.post()
This commit is contained in:
parent
fe1feca009
commit
d3d3bceec9
|
@ -186,7 +186,7 @@ const xhr = {
|
|||
},
|
||||
json: function(url, params = {}, complete = undefined, failed = undefined) {
|
||||
return new Promise((resolve, reject) =>
|
||||
this.post(url, params).then((data) => {
|
||||
this.post(url, params, null, failed).then((data) => {
|
||||
let obj = null;
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue