]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/Utils.js
ui: eslint: enforce "no-unneeded-ternary" rule
[pve-manager.git] / www / manager6 / Utils.js
index 80be1e8dc5eb62f8b27a813aa520be4aaf47060c..5d476600b458bfa5caf44c192158ae908310cd19 100644 (file)
@@ -1251,7 +1251,7 @@ Ext.define('PVE.Utils', {
            // Note: we need to tell android the correct file name extension
            // but we do not set 'download' tag for other environments, because
            // It can have strange side effects (additional user prompt on firefox)
-           var andriod = navigator.userAgent.match(/Android/i) ? true : false;
+           var andriod = !!navigator.userAgent.match(/Android/i);
            if (andriod) {
                link.download = name;
            }
@@ -1527,7 +1527,7 @@ Ext.define('PVE.Utils', {
            if (Proxmox.UserName === 'root@pam') {
                container.el.mask();
                if (!container.down('pveCephInstallWindow')) {
-                   var isInstalled = msg.match(/not initialized/i) ? true : false;
+                   var isInstalled = !!msg.match(/not initialized/i);
                    var win = Ext.create('PVE.ceph.Install', {
                        nodename: nodename,
                    });