Skip to content

Commit

Permalink
Merge pull request #52 from mqttjs/multiple-user-properties-with-same…
Browse files Browse the repository at this point in the history
…-name

fix build in mqttjs
  • Loading branch information
mcollina committed Mar 21, 2019
2 parents c8e094b + a026a38 commit e6b6af1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion writeToStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e6b6af1

Please sign in to comment.