diff --git a/lib/path.js b/lib/path.js index 70e9af48eb067c..cf03516169b862 100644 --- a/lib/path.js +++ b/lib/path.js @@ -31,13 +31,13 @@ function assertPath(path) { function assertWindowsPlatform(platform) { // throw an error if direct use the function on *nix platform - if (process.platform !== 'win32') + if (platform !== 'win32') throw new errors.Error('ERR_UNSUPPORTED_PLATFORM'); } function assertPosixPlatform(platform) { // throw an error if direct use the function on windows platform - if (process.process === 'win32') + if (platform === 'win32') throw new errors.Error('ERR_UNSUPPORTED_PLATFORM'); }