Skip to content

Commit

Permalink
fix: changed substr to slice (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankitchaudharyy committed Oct 10, 2022
1 parent 2caf3ca commit b72370c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapters/mqtt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MqttAdapter extends Adapter {
this.client = mqtt.connect({
host: url.host,
port: url.port || (url.protocol === 'mqtt:' ? 1883 : 8883),
protocol: url.protocol.substr(0, url.protocol.length - 1),
protocol: url.protocol.slice(0, url.protocol.length - 1),
clientId: serverBinding && serverBinding.clientId,
clean: serverBinding && serverBinding.cleanSession,
will: serverBinding && serverBinding.will && {
Expand Down

0 comments on commit b72370c

Please sign in to comment.