diff --git a/lib/internal/process/per_thread.js b/lib/internal/process/per_thread.js index 952abda8b67147..ad634b757eca48 100644 --- a/lib/internal/process/per_thread.js +++ b/lib/internal/process/per_thread.js @@ -85,7 +85,7 @@ function setupCpuUsage(_cpuUsage) { // Ensure that a previously passed in value is valid. Currently, the native // implementation always returns numbers <= Number.MAX_SAFE_INTEGER. function previousValueIsValid(num) { - return Number.isFinite(num) && + return typeof num === 'number' && num <= Number.MAX_SAFE_INTEGER && num >= 0; }