File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -953,7 +953,8 @@ default:
953
953
954
954
for now i just suppressed the warnings
955
955
*/
956
- MqttClient . prototype . _handlePublish = function ( packet , done = function ( ) { } ) {
956
+ MqttClient . prototype . _handlePublish = function ( packet , done ) {
957
+ done = typeof done !== 'undefined' ? done : function ( ) { }
957
958
var topic = packet . topic . toString ( )
958
959
var message = packet . payload
959
960
var qos = packet . qos
@@ -1076,7 +1077,8 @@ MqttClient.prototype._handleAck = function (packet) {
1076
1077
* @param {Object } packet
1077
1078
* @api private
1078
1079
*/
1079
- MqttClient . prototype . _handlePubrel = function ( packet , callback = function ( ) { } ) {
1080
+ MqttClient . prototype . _handlePubrel = function ( packet , callback ) {
1081
+ callback = typeof callback !== 'undefined' ? callback : function ( ) { }
1080
1082
var mid = packet . messageId
1081
1083
var that = this
1082
1084
You can’t perform that action at this time.
0 commit comments