summaryrefslogtreecommitdiff
path: root/web/share/js
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-20 18:22:09 +0200
committerMaxim Devaev <[email protected]>2023-03-20 18:22:09 +0200
commit4f70060d5ed68d114be7c421a9a21e9fbca98601 (patch)
treea089889ef7f3733d797eed6120b24b061f37c0b9 /web/share/js
parentb5b6733b2aff99fc3f815ee9b88fb7025c55db7c (diff)
don't clean msd image selector when offline
Diffstat (limited to 'web/share/js')
-rw-r--r--web/share/js/kvm/msd.js9
1 files changed, 3 insertions, 6 deletions
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 = "";