diff --git a/bplistParser.js b/bplistParser.js index f6fb983..255abef 100644 --- a/bplistParser.js +++ b/bplistParser.js @@ -43,7 +43,8 @@ exports.parseFile = function (fileNameOrBuffer, callback) { fs.readFile(fileNameOrBuffer, function (err, data) { if (err) { reject(err); - return callback(err); + if (callback) callback(err); + return; } tryParseBuffer(data); });