Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
fix(join): use origin + pathname instead of plain location
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Sep 5, 2020
1 parent 2171b0c commit d9a37f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/modules/synclounge/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default {
ESTABLISH_SOCKET_CONNECTION: async ({ getters, commit, dispatch }) => {
await dispatch('DISCONNECT_IF_CONNECTED');

const properBase = new URL(getters.GET_SERVER, window.location);
const currentUrl = new URL(window.location.pathname, window.location.origin);
const properBase = new URL(getters.GET_SERVER, currentUrl);

const url = combineUrl('socket.io', properBase.toString());
console.log('ESTABLISH_SOCKET_CONNECTION', url.toString());
Expand Down

0 comments on commit d9a37f2

Please sign in to comment.