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