Skip to content

Commit

Permalink
Not to mix && and ||
Browse files Browse the repository at this point in the history
  • Loading branch information
gnought committed Jul 13, 2019
1 parent 05d21d2 commit 3621bd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function Packet (original, broker) {
this.cmd = original.cmd || 'publish'
this.brokerId = original.brokerId || (broker && broker.id)
this.brokerCounter = original.brokerCounter || (broker && (++broker.counter) || 0)
this.brokerCounter = original.brokerCounter || (broker ? (++broker.counter) : 0)
this.topic = original.topic
this.payload = original.payload || new Buffer(0)
this.qos = original.qos || 0
Expand Down

0 comments on commit 3621bd8

Please sign in to comment.