diff --git a/index.js b/index.js index d9127db..0bc3ea0 100644 --- a/index.js +++ b/index.js @@ -96,7 +96,7 @@ exports.unmount = function (mnt, cb) { } exports.errno = function (code) { - return exports[code.toUpperCase()] || -1 + return (code && exports[code.toUpperCase()]) || -1 } exports.EPERM = -1