Web: only use the tasks table if it exists
Because of the `v-if` attribute, `this.$refs.tasksTable` may actually be `null` if there are no tasks shown.
This commit is contained in:
parent
0c79701bea
commit
ad04856a02
@ -132,14 +132,10 @@ export default {
|
||||
* @param {API.SocketIOTaskUpdate} taskUpdate
|
||||
*/
|
||||
onSioTaskUpdate(taskUpdate) {
|
||||
if (!this.$refs.tasksTable) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.$refs.tasksTable.processTaskUpdate(taskUpdate);
|
||||
if (this.tasks.activeTaskID == taskUpdate.id) {
|
||||
if (this.$refs.tasksTable)
|
||||
this.$refs.tasksTable.processTaskUpdate(taskUpdate);
|
||||
if (this.tasks.activeTaskID == taskUpdate.id)
|
||||
this.onSelectedTaskChanged(taskUpdate);
|
||||
}
|
||||
},
|
||||
|
||||
onChatMessage(message) {
|
||||
@ -150,7 +146,8 @@ export default {
|
||||
// SocketIO connection event handlers:
|
||||
onSIOReconnected() {
|
||||
this.$refs.jobsTable.onReconnected();
|
||||
this.$refs.tasksTable.onReconnected();
|
||||
if (this.$refs.tasksTable)
|
||||
this.$refs.tasksTable.onReconnected();
|
||||
this.fetchManagerInfo();
|
||||
},
|
||||
onSIODisconnected(reason) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user