fix: only log errors when challenges update (#41214)
* fix: only log errors when challenges update * refactor: handle error first Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5090ea66c3
commit
156f47b000
@ -52,12 +52,13 @@ exports.parseMD = function parseMD(filename) {
|
||||
const file = readSync(filename);
|
||||
const tree = processor.parse(file);
|
||||
processor.run(tree, file, function(err, node, file) {
|
||||
if (err) {
|
||||
err.message += ' in file ' + filename;
|
||||
reject(err);
|
||||
if (!err) {
|
||||
delete file.contents;
|
||||
resolve(file.data);
|
||||
}
|
||||
delete file.contents;
|
||||
return resolve(file.data);
|
||||
|
||||
err.message += ' in file ' + filename;
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user