diff --git a/lib/hk-util.js b/lib/hk-util.js index 7545c2f56..3f0aed360 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -955,7 +955,7 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct) { })); }).nThen(function (w) { // if there's no validateKey present skip to the next block - if (!metadata.validateKey) { return; } + if (!(metadata && metadata.validateKey)) { return; } // trim the checkpoint indicator off the message if it's present let signedMsg = (isCp) ? msgStruct[4].replace(CHECKPOINT_PATTERN, '') : msgStruct[4];