From a026a3860358c0318cde1a80a2e393db6c73a759 Mon Sep 17 00:00:00 2001 From: Siarhei Buntsevich Date: Thu, 21 Mar 2019 11:26:56 +0300 Subject: [PATCH] fix build in mqttjs --- writeToStream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/writeToStream.js b/writeToStream.js index f7732d7..7ade926 100644 --- a/writeToStream.js +++ b/writeToStream.js @@ -928,7 +928,7 @@ function getProperties (stream, properties) { length += Object.getOwnPropertyNames(value).reduce(function (result, name) { var currentValue = value[name] if (Array.isArray(currentValue)) { - result += currentValue.reduce((currentLength, value) => { + result += currentValue.reduce(function (currentLength, value) { currentLength += 1 + 2 + Buffer.byteLength(name.toString()) + 2 + Buffer.byteLength(value.toString()) return currentLength }, 0)