Remove trailing slash

This commit is contained in:
Sam 2018-07-22 23:40:11 +10:00
parent 1f8db9b70e
commit 5aa6bd070c
1 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,12 @@ export default {
console.log('Socket attempt connect on ' + address)
let path = address.split('/')[3] || ''
address = address.replace(path, '')
console.log('Address is', address)
if (address[address.length - 1] === '/') {
console.log('Removing extra slash', address)
address = address.slice(0, -1)
console.log('Done', address)
}
console.log('Pathname', path)
state._socket = state._io.connect(address, {
'forceNew': true,