diff --git a/lib/internal/errors.js b/lib/internal/errors.js index ec03ead14623f6..df3fcb13873015 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);