ui: eslint: fix undefined check

'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@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-09-15 11:48:24 +02:00 committed by Thomas Lamprecht
parent d088f89b16
commit 13799d5b9e

View File

@ -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!";
}
}