From 4f70060d5ed68d114be7c421a9a21e9fbca98601 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Mon, 20 Mar 2023 18:22:09 +0200 Subject: don't clean msd image selector when offline --- web/share/js/kvm/msd.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'web') diff --git a/web/share/js/kvm/msd.js b/web/share/js/kvm/msd.js index 01504934..a7095c54 100644 --- a/web/share/js/kvm/msd.js +++ b/web/share/js/kvm/msd.js @@ -320,14 +320,11 @@ export function Msd() { var __applyStateImageSelector = function() { let s = __state; - let el = $("msd-image-selector"); - if (!(s && s.online)) { - el.options.length = 1; // Cleanup - return; - } - if (s.storage.uploading || s.storage.downloading) { + if (!(s && s.online) || s.storage.uploading || s.storage.downloading) { return; } + + let el = $("msd-image-selector"); el.options.length = 1; let selected = ""; -- cgit v1.2.3