removed unnecessary try/catch logic

This commit is contained in:
Sean 2023-07-28 19:34:51 -04:00
parent c73e737c7d
commit c263131927
2 changed files with 11 additions and 13 deletions

View File

@ -128,13 +128,11 @@ export default {
async mounted() { async mounted() {
const nodeId = this.pod.spec?.nodeName; const nodeId = this.pod.spec?.nodeName;
try { const schema = this.$store.getters[`cluster/schemaFor`](NODE);
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
if (schema) { if (schema) {
await this.$store.dispatch('cluster/find', { type: NODE, id: nodeId }); await this.$store.dispatch('cluster/find', { type: NODE, id: nodeId });
} }
} catch {}
await this.setupTerminal(); await this.setupTerminal();
await this.connect(); await this.connect();

View File

@ -34,15 +34,15 @@ export default class Pod extends WorkloadService {
} }
get node() { get node() {
try { const schema = this.$store.getters[`cluster/schemaFor`](NODE);
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
if (schema) { if (schema) {
this.$dispatch(`find`, { type: NODE, id: this.spec.nodeName }); this.$dispatch(`find`, { type: NODE, id: this.spec.nodeName });
}
} catch {}
return this.$getters['byId'](NODE, this.spec.nodeName); return this.$getters['byId'](NODE, this.spec.nodeName);
}
return undefined;
} }
get _availableActions() { get _availableActions() {