From ad19987f0870bbfabcdbc3e6278934b0d8084d86 Mon Sep 17 00:00:00 2001 From: Sander Mertens Date: Tue, 6 Jun 2023 11:20:15 -0700 Subject: [PATCH] Fix invalid undefined dereferences during explorer init --- etc/js/app.js | 18 ++++++++++++++---- etc/js/entity_inspector.js | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/etc/js/app.js b/etc/js/app.js index 59163c5b..93c60e71 100644 --- a/etc/js/app.js +++ b/etc/js/app.js @@ -681,26 +681,36 @@ var app = new Vue({ }, refresh_query() { - this.$refs.query.refresh(); + if (this.$refs.query) { + this.$refs.query.refresh(); + } }, refresh_entity() { - this.$refs.inspector.refresh(); + if (this.$refs.inspector) { + this.$refs.inspector.refresh(); + } }, refresh_tree() { - this.$refs.tree.update_expanded(); + if (this.$refs.tree) { + this.$refs.tree.update_expanded(); + } }, refresh_stats() { if (this.$refs.stats_world) { this.$refs.stats_world.refresh(); + } + if (this.$refs.stats_pipeline) { this.$refs.stats_pipeline.refresh(); } }, refresh_alerts() { - this.$refs.alerts.refresh(); + if (this.$refs.alerts) { + this.$refs.alerts.refresh(); + } }, // Entity selected diff --git a/etc/js/entity_inspector.js b/etc/js/entity_inspector.js index cb89482e..7bd97587 100644 --- a/etc/js/entity_inspector.js +++ b/etc/js/entity_inspector.js @@ -1089,9 +1089,9 @@ const inspector_component = Vue.component('inspector', {