diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 79c4c7fd024156..85d64d6e0c91e2 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -787,7 +787,7 @@ const fatalExceptionStackEnhancers = { // However, fatal error are handled differently and we cannot easily // highlight them. On Windows, detecting whether a console supports // ANSI escape sequences is not reliable. - if (process.platform === 'win32') { + if (isWindows) { const info = internalBinding('os').getOSInformation(); const ver = ArrayPrototypeMap(StringPrototypeSplit(info[2], '.'), Number);