diff --git a/lib/AdaptiveLighting.js b/lib/AdaptiveLighting.js index 780e0799..38b6d6ff 100644 --- a/lib/AdaptiveLighting.js +++ b/lib/AdaptiveLighting.js @@ -156,6 +156,9 @@ function tlvFromUInt (type, value) { // Return a TVL buffer for given type and hex string value. function tlvFromHexString (type, value) { + if (value == null) { + return Buffer.alloc(0) + } return tlvFromBuffer(type, Buffer.from(value, 'hex')) }