Skip to content
Snippets Groups Projects
Commit d3d3bcee authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

xhr.json: properly pass failure callback to xhr.post()

parent fe1feca0
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,7 @@ const xhr = { ...@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment