mirror of https://github.com/rancher/dashboard.git
removed unnecessary try/catch logic
This commit is contained in:
parent
c73e737c7d
commit
c263131927
|
|
@ -128,13 +128,11 @@ export default {
|
|||
async mounted() {
|
||||
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) {
|
||||
await this.$store.dispatch('cluster/find', { type: NODE, id: nodeId });
|
||||
}
|
||||
} catch {}
|
||||
if (schema) {
|
||||
await this.$store.dispatch('cluster/find', { type: NODE, id: nodeId });
|
||||
}
|
||||
|
||||
await this.setupTerminal();
|
||||
await this.connect();
|
||||
|
|
|
|||
|
|
@ -34,15 +34,15 @@ export default class Pod extends WorkloadService {
|
|||
}
|
||||
|
||||
get node() {
|
||||
try {
|
||||
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
|
||||
const schema = this.$store.getters[`cluster/schemaFor`](NODE);
|
||||
|
||||
if (schema) {
|
||||
this.$dispatch(`find`, { type: NODE, id: this.spec.nodeName });
|
||||
}
|
||||
} catch {}
|
||||
if (schema) {
|
||||
this.$dispatch(`find`, { type: NODE, id: this.spec.nodeName });
|
||||
|
||||
return this.$getters['byId'](NODE, this.spec.nodeName);
|
||||
return this.$getters['byId'](NODE, this.spec.nodeName);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
get _availableActions() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue