fix: parse mqtt pathname - fixed #1959
This commit is contained in:
@@ -244,7 +244,9 @@ export default defineComponent({
|
|||||||
]
|
]
|
||||||
const parseUrl = new URL(this.url)
|
const parseUrl = new URL(this.url)
|
||||||
this.client = new Paho.Client(
|
this.client = new Paho.Client(
|
||||||
parseUrl.hostname,
|
`${parseUrl.hostname}${
|
||||||
|
parseUrl.pathname !== "/" ? parseUrl.pathname : ""
|
||||||
|
}`,
|
||||||
parseUrl.port !== "" ? Number(parseUrl.port) : 8081,
|
parseUrl.port !== "" ? Number(parseUrl.port) : 8081,
|
||||||
"hoppscotch"
|
"hoppscotch"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user