From 5db510e66534658d0e113677aec7eb3bf913b940 Mon Sep 17 00:00:00 2001 From: joelbandi Date: Mon, 1 Aug 2016 05:44:14 -0700 Subject: [PATCH] minor fix --- src/js/iotjs/src/slot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/iotjs/src/slot.js b/src/js/iotjs/src/slot.js index 0a2824b..c283546 100644 --- a/src/js/iotjs/src/slot.js +++ b/src/js/iotjs/src/slot.js @@ -26,12 +26,12 @@ var Slot = function () { if (prevhmac && prevhmac instanceof Uint8Array) { this.prevhmac = prevhmac; } else { - throw new Error("prevhmac input not valid"); + this.prevhmac = new Uint8Array(this.HMAC_SIZE); } if (hmac && hmac instanceof Uint8Array) { this.hmac = hmac; } else { - throw new Error("Hmac input not valid"); + this.hmac = null; } this.entries = []; this.freespace = this.SLOT_SIZE - getBaseSize(); //??????? -- 2.34.1