Skip to content

Conversation

@ZYSzys
Copy link
Member

@ZYSzys ZYSzys commented Dec 21, 2018

If options is a function, we don't need to call maybeCallback to check it again.

node/lib/fs.js

Lines 130 to 135 in 4ac1702

function maybeCallback(cb) {
if (typeof cb === 'function')
return cb;
throw new ERR_INVALID_CALLBACK();
}

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the fs Issues and PRs related to the fs subsystem / file system. label Dec 21, 2018
@lpinca
Copy link
Member

lpinca commented Feb 9, 2019

@lpinca
Copy link
Member

lpinca commented Feb 9, 2019

Landed in e34d41e.

@lpinca lpinca closed this Feb 9, 2019
lpinca pushed a commit that referenced this pull request Feb 9, 2019
PR-URL: #25160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@ZYSzys ZYSzys deleted the fs-redundant-check branch February 10, 2019 06:45
targos pushed a commit that referenced this pull request Feb 10, 2019
PR-URL: #25160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targos targos mentioned this pull request Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants