]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
utils: render_cpu: fix theoretical bug
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 22 Apr 2021 15:48:38 +0000 (17:48 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 22 Apr 2021 15:48:41 +0000 (17:48 +0200)
seems almost like this came from a failed application of the rules of
de-morgan...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/Utils.js

index 5f4f2aed8744f239a319b756588e089f4a59fa61..e1cddc81fdb18f7b8739dbbd67e10daef4091f63 100644 (file)
@@ -866,7 +866,7 @@ utilities: {
        }
 
        let maxcpu = record.data.maxcpu || 1;
-       if (!Ext.isNumeric(maxcpu) && maxcpu >= 1) {
+       if (!Ext.isNumeric(maxcpu) || maxcpu < 1) {
            return '';
        }
        let cpuText = maxcpu > 1 ? 'CPUs' : 'CPU';