diff --git a/shell/components/nav/WindowManager/ContainerShell.vue b/shell/components/nav/WindowManager/ContainerShell.vue index 801a0e5219..2ba567d9dd 100644 --- a/shell/components/nav/WindowManager/ContainerShell.vue +++ b/shell/components/nav/WindowManager/ContainerShell.vue @@ -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(); diff --git a/shell/models/pod.js b/shell/models/pod.js index 0e235f4c54..faee0872fc 100644 --- a/shell/models/pod.js +++ b/shell/models/pod.js @@ -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() {