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
|
* @param {API.SocketIOTaskUpdate} taskUpdate
|
||||||
*/
|
*/
|
||||||
onSioTaskUpdate(taskUpdate) {
|
onSioTaskUpdate(taskUpdate) {
|
||||||
if (!this.$refs.tasksTable) {
|
if (this.$refs.tasksTable)
|
||||||
return;
|
this.$refs.tasksTable.processTaskUpdate(taskUpdate);
|
||||||
}
|
if (this.tasks.activeTaskID == taskUpdate.id)
|
||||||
|
|
||||||
this.$refs.tasksTable.processTaskUpdate(taskUpdate);
|
|
||||||
if (this.tasks.activeTaskID == taskUpdate.id) {
|
|
||||||
this.onSelectedTaskChanged(taskUpdate);
|
this.onSelectedTaskChanged(taskUpdate);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onChatMessage(message) {
|
onChatMessage(message) {
|
||||||
@ -150,7 +146,8 @@ export default {
|
|||||||
// SocketIO connection event handlers:
|
// SocketIO connection event handlers:
|
||||||
onSIOReconnected() {
|
onSIOReconnected() {
|
||||||
this.$refs.jobsTable.onReconnected();
|
this.$refs.jobsTable.onReconnected();
|
||||||
this.$refs.tasksTable.onReconnected();
|
if (this.$refs.tasksTable)
|
||||||
|
this.$refs.tasksTable.onReconnected();
|
||||||
this.fetchManagerInfo();
|
this.fetchManagerInfo();
|
||||||
},
|
},
|
||||||
onSIODisconnected(reason) {
|
onSIODisconnected(reason) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user