Skip to content

Commit

Permalink
fix: changed substr to slice (#336) (#345)
Browse files Browse the repository at this point in the history
Co-authored-by: ankitchaudharyy-TW <[email protected]>
  • Loading branch information
Ankitchaudharyy and ankitchaudharyy-TW authored Oct 10, 2022
1 parent b2f3143 commit 33fa9a3
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 33fa9a3

Please sign in to comment.