diff --git a/lib/storage/file.js b/lib/storage/file.js index 6b1577d80..1d4061c4b 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -970,6 +970,15 @@ var trimChannel = function (env, channelName, hash, _cb) { } var msg = Util.tryParse(s_msg); + + if (!msg) { + Log.error("TRIM_HISTORY_UNPARSED_LINE", { + content: s_msg, + index: i, + }); + return void readMore(); + } + var msgHash = Extras.getHash(msg[4]); if (msgHash === hash) {