Skip to content

Commit ece470d

Browse files
committed
refactor: for to use local id for the sessiom
1 parent 8382925 commit ece470d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/Widget/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class Widget extends Component {
343343
// storage.clear();
344344
// Store the received session_id to storage
345345

346-
storeLocalSession(storage, SESSION_NAME, remoteId);
346+
storeLocalSession(storage, SESSION_NAME, localId);
347347
dispatch(pullSession());
348348
if (sendInitPayload) {
349349
this.trySendInitPayload();

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const ConnectedWidget = forwardRef((props, ref) => {
3434
console.log('is it init', this.socket !== null && this.socket.connected);
3535
console.log('marker', this.marker);
3636
console.log('socket', this.socket);
37-
return this.socket !== null;
37+
return this.socket !== null && this.socket.connected;
3838
}
3939

4040
on(event, callback) {

0 commit comments

Comments
 (0)