This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: fix 'object is not a function' callback errors
Use a default callback if the user omitted one. Avoids errors like the one below: fs.js:777 if (err) return callback(err); ^ TypeError: object is not a function at fs.appendFile (fs.js:777:21) at Object.oncomplete (fs.js:297:15) This commit fixes the behavior of fs.lchmod(), fs.lchown() and fs.readFile() when the callback is omitted. Before, they silently swallowed errors. Fixes #4352.
- Loading branch information
1 parent
03b00dc
commit a804347
Showing
2 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters