Skip to content

Commit

Permalink
Make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- committed Oct 12, 2022
1 parent 14e622a commit 32a8a20
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/ts/hilla-frontend/src/FluxConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,30 @@ export class FluxConnection extends EventTarget {
onMessage: (response: any) => {
this.handleMessage(JSON.parse(response.responseBody));
},
onopen: (response: any) => {
onopen: (_response: any) => {
if (this.state === State.INACTIVE) {
this.state = State.ACTIVE;
this.dispatchEvent(new CustomEvent('state-changed', { detail: { active: true } }));
this.sendPendingMessages();
}
},
onreopen: (response: any) => {
onreopen: (_response: any) => {
if (this.state === State.INACTIVE) {
this.state = State.ACTIVE;
this.dispatchEvent(new CustomEvent('state-changed', { detail: { active: true } }));
this.sendPendingMessages();
}
},
onclose: (response: any) => {
onclose: (_response: any) => {
// https://socket.io/docs/v4/client-api/#event-disconnect
if (this.state === State.ACTIVE) {
this.state = State.INACTIVE;
this.dispatchEvent(new CustomEvent('state-changed', { detail: { active: false } }));
}
},
onError: (response: any) => {
console.error(response);
// eslint-disable-next-line no-console
console.error('error in push communication', response);
},
};
this.socket = atmosphere.subscribe!({
Expand Down

0 comments on commit 32a8a20

Please sign in to comment.