Skip to content

Commit

Permalink
Fix invalid undefined dereferences during explorer init
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Jun 6, 2023
1 parent 37fad2d commit 76c9dbc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
18 changes: 14 additions & 4 deletions etc/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions etc/js/entity_inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -1089,9 +1089,9 @@ const inspector_component = Vue.component('inspector', {
</template>
<template v-slot:detail>
<div class="inspector-alert" v-for="alert in alerts">
<span><icon icon="feather:alert-triangle"
<icon icon="feather:alert-triangle"
:size="14" :opacity="0.7">
</icon></span>&nbsp;<span>{{alert.message}}</span>
</icon></span>&nbsp;{{alert.message}}</span>
</div>
</template>
</detail-toggle>
Expand Down
4 changes: 3 additions & 1 deletion etc/js/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ Vue.component('query', {
}
},
set_offset_limit(offset, limit) {
this.$refs.footer.set_offset_limit(offset, limit);
if (this.$refs.footer) {
this.$refs.footer.set_offset_limit(offset, limit);
}
},
get_error() {
return this.query_error;
Expand Down

0 comments on commit 76c9dbc

Please sign in to comment.