tools: fix logic nit in tools/doc/generate.js

PR-URL: https://github.com/nodejs/node/pull/19475
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Vse Mozhet Byt 2018-03-20 14:38:00 +02:00 committed by Myles Borins
parent 5960cde4eb
commit 0414a8c7ed
No known key found for this signature in database
GPG Key ID: 933B01F40B5CA946

View File

@ -65,8 +65,8 @@ function next(er, input) {
switch (format) {
case 'json':
require('./json.js')(input, filename, (er, obj) => {
console.log(JSON.stringify(obj, null, 2));
if (er) throw er;
console.log(JSON.stringify(obj, null, 2));
});
break;