Skip to content

Commit

Permalink
fix: Fix mode normalization in fs.access
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Apr 27, 2020
1 parent 4c65050 commit 00f2a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions access.js
Expand Up @@ -30,8 +30,8 @@ module.exports = function (path/*[, mode[, callback]]*/) {
if (!isValue(cb) && isCallable(mode)) {
cb = mode;
mode = defaultMode;
} else {
mode = Object(mode);
} else if (isValue(mode)) {
mode = Number(mode);
}

return access(path, mode).cb(cb);
Expand Down

0 comments on commit 00f2a52

Please sign in to comment.