pollTask resolves with full response data
This commit is contained in:
parent
2f9eef920a
commit
5f19d6392f
1 changed files with 2 additions and 2 deletions
|
|
@ -155,7 +155,7 @@ export default new Vuex.Store({
|
|||
var result = response.data.status
|
||||
// If the task ends with success
|
||||
if(result == 'success') {
|
||||
resolve(response.data.return)
|
||||
resolve(response.data)
|
||||
}
|
||||
// If task ends with an error
|
||||
else if (result == 'error') {
|
||||
|
|
@ -163,7 +163,7 @@ export default new Vuex.Store({
|
|||
}
|
||||
// If the condition isn't met but the timeout hasn't elapsed, go again
|
||||
else if (Number(new Date()) < endTime) {
|
||||
setTimeout(checkCondition, interval, resolve, reject)
|
||||
setTimeout(checkCondition, interval, resolve, reject)
|
||||
}
|
||||
// Didn't match and too much time, reject!
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue