From 09884c54c02f985a3c85cb7c1599b601786a45b4 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Mon, 26 May 2025 15:22:57 +0300 Subject: [PATCH] refactoring --- web/share/js/kvm/switch.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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() {