Skip to content

Commit

Permalink
Update Client.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tmwilliamlin168 committed Feb 16, 2021
1 parent a38d301 commit 5ce4cfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions back/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class Client {
this.onceListeners.get(e).push(f);
this.socket.once(e, (...args) => {
this.onceListeners.get(e).splice(this.onceListeners.get(e).indexOf(f), 1);
f(args);
f(...args);
});
}
removeAllListeners(e: string) {
Expand All @@ -47,7 +47,7 @@ export default class Client {
this.onceListeners.forEach((fs, e) => fs.forEach((f: (...args: any[]) => void) => {
socket.once(e, (...args) => {
this.onceListeners.get(e).splice(this.onceListeners.get(e).indexOf(f), 1);
f(args);
f(...args);
});
}));
if (this.room)
Expand Down

0 comments on commit 5ce4cfe

Please sign in to comment.