Please sign in to comment.
fs: do not pass Buffer when toString() fails
Even though an Error object is passed to the callback when readFile() fails due to toString() failing, it is a bit strange to still see data passed as the second argument. This commit changes that and only passes the Error object in that case. PR-URL: #9670 Reviewed-By: Colin Ihrig <firstname.lastname@example.org> Reviewed-By: Michaël Zasso <email@example.com> Reviewed-By: Sakthipriyan Vairamani <firstname.lastname@example.org> Reviewed-By: Prince John Wesley <email@example.com> Reviewed-By: James M Snell <firstname.lastname@example.org>
- Loading branch information...
Showing with 5 additions and 7 deletions.