change error handling for api callback - check length is not zero on jquery el
This commit is contained in:
parent
082b868ecd
commit
c59f80ff2d
2 changed files with 2 additions and 7 deletions
|
@ -15,7 +15,7 @@ export default (newStateData, tasks) => {
|
|||
tasksStates.currentState = tasks.indexOf('0 of 0') === 0;
|
||||
}
|
||||
|
||||
if ($tasks && !tasksStates.newState) {
|
||||
if ($tasks.length !== 0 && !tasksStates.newState) {
|
||||
$tasks.text(newStateData.task_status);
|
||||
$tasksShort.text(newStateData.task_status);
|
||||
} else if (tasksStates.currentState) {
|
||||
|
|
|
@ -25,12 +25,7 @@ export default {
|
|||
this.renderResponse(res);
|
||||
},
|
||||
errorCallback: (err) => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('ISSUE SHOW REALTIME ERROR', err, err.stack);
|
||||
} else {
|
||||
throw new Error(err);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue