Comparing version 1.1.6 to 1.1.7
@@ -6,11 +6,11 @@ const io = require("socket.io-client"); | ||
// Function to connect the socket | ||
async function connectSocket(url) { | ||
function connectSocket(url) { | ||
socket = io(url); | ||
const currentRoute = window.location.pathname; | ||
try { | ||
const status = await socket.on("connect", () => { | ||
const status = socket.on("connect", () => { | ||
return true; | ||
}); | ||
if (status) { | ||
if (status()) { | ||
return currentRoute; | ||
@@ -17,0 +17,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"name": "sockettwo", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"main": "index.js", | ||
@@ -9,0 +9,0 @@ "devDependencies": {}, |
1870