Add comment about setTimeout hack
This commit is contained in:
parent
c8697d8893
commit
dddeca9867
1 changed files with 1 additions and 0 deletions
|
@ -5,6 +5,7 @@ export class DraftBot {
|
|||
assign(player: SessionPlayer) {
|
||||
player.on("available-picks", cards => {
|
||||
const pick = this.pick(cards);
|
||||
// setTimeout hack to avoid handlers being called before the rest of the code
|
||||
setTimeout(() => player.pick(pick.ID), 0);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue