diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 19422047360d24..f1b3a8b1baa1b7 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -781,7 +781,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);