diff --git a/web/share/js/kvm/switch.js b/web/share/js/kvm/switch.js
index 8fd5498e..4525ea8d 100644
--- a/web/share/js/kvm/switch.js
+++ b/web/share/js/kvm/switch.js
@@ -440,6 +440,7 @@ export function Switch() {
let model = __state.model;
let edids = __state.edids;
+ let pa = model.ports[port]; // Port attrs
let atx_actions = {
"power": "ATX power click",
@@ -465,7 +466,7 @@ export function Switch() {
Port name:
@@ -476,7 +477,7 @@ export function Switch() {
`;
- let fw = model.units[model.ports[port].unit].firmware;
+ let fw = model.units[pa.unit].firmware;
if (fw.devbuild || fw.version >= 8) {
html += `
@@ -487,7 +488,7 @@ export function Switch() {