fix: parse mqtt pathname - fixed #1959

This commit is contained in:
liyasthomas
2021-11-17 17:43:04 +05:30
parent 48a6c87d9d
commit 8f9bb621b8

View File

@@ -244,7 +244,9 @@ export default defineComponent({
]
const parseUrl = new URL(this.url)
this.client = new Paho.Client(
parseUrl.hostname,
`${parseUrl.hostname}${
parseUrl.pathname !== "/" ? parseUrl.pathname : ""
}`,
parseUrl.port !== "" ? Number(parseUrl.port) : 8081,
"hoppscotch"
)