Skip to content

Commit d7391a9

Browse files
committed
Replaced function () {} with nop
1 parent 4a7e90b commit d7391a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ default:
954954
for now i just suppressed the warnings
955955
*/
956956
MqttClient.prototype._handlePublish = function (packet, done) {
957-
done = typeof done !== 'undefined' ? done : function () {}
957+
done = typeof done !== 'undefined' ? done : nop
958958
var topic = packet.topic.toString()
959959
var message = packet.payload
960960
var qos = packet.qos
@@ -1078,7 +1078,7 @@ MqttClient.prototype._handleAck = function (packet) {
10781078
* @api private
10791079
*/
10801080
MqttClient.prototype._handlePubrel = function (packet, callback) {
1081-
callback = typeof callback !== 'undefined' ? callback : function () {}
1081+
callback = typeof callback !== 'undefined' ? callback : nop
10821082
var mid = packet.messageId
10831083
var that = this
10841084

0 commit comments

Comments
 (0)