[pve-devel] [PATCH manager] ui: eslint: fix undefined check
Dominik Csapak
d.csapak at proxmox.com
Thu Sep 15 11:48:24 CEST 2022
'typeof' cannot return 'undefined' only the string '"undefined"', newer
eslint versions detect that as error
to fix it, directly check it for undefined instead of using typeof
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/storage/PBSEdit.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/manager6/storage/PBSEdit.js b/www/manager6/storage/PBSEdit.js
index d880308c..5b6b6bb8 100644
--- a/www/manager6/storage/PBSEdit.js
+++ b/www/manager6/storage/PBSEdit.js
@@ -365,7 +365,7 @@ Ext.define('PVE.panel.PBSEncryptionKeyTab', {
} catch (e) {
return "Failed to parse key - " + e;
}
- if (typeof key.data === undefined) {
+ if (key.data === undefined) {
return "Does not seems like a valid Proxmox Backup key!";
}
}
--
2.30.2
More information about the pve-devel
mailing list