From: Thomas Lamprecht Date: Thu, 22 Apr 2021 15:48:38 +0000 (+0200) Subject: utils: render_cpu: fix theoretical bug X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1334cdcabccd1800f3e7043b54a200c736a13a65;p=proxmox-widget-toolkit.git utils: render_cpu: fix theoretical bug seems almost like this came from a failed application of the rules of de-morgan... Signed-off-by: Thomas Lamprecht --- diff --git a/src/Utils.js b/src/Utils.js index 5f4f2ae..e1cddc8 100644 --- a/src/Utils.js +++ b/src/Utils.js @@ -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';