TS formatting

This commit is contained in:
Thibault Duplessis 2019-04-29 20:55:48 +07:00
parent cb37feddd6
commit b18726b7eb

View file

@ -48,14 +48,14 @@ export default class LobbyController {
this.stores = makeStores(this.data.me ? this.data.me.username.toLowerCase() : null);
this.tab = this.isBot ? 'now_playing' : this.stores.tab.get(),
this.mode = this.stores.mode.get(),
this.sort = this.stores.sort.get(),
this.trans = opts.trans;
this.mode = this.stores.mode.get(),
this.sort = this.stores.sort.get(),
this.trans = opts.trans;
this.poolInStorage = li.storage.make('lobby.pool-in');
this.poolInStorage.listen(e => { // when another tab joins a pool
if (!e.newValue || e.newValue === li.StrongSocket.sri) return; // same tab, doh, IE 11
this.leavePool();
this.leavePool();
redraw();
});
this.flushHooksSchedule();
@ -235,9 +235,9 @@ export default class LobbyController {
private onNewOpponent() {
if (location.hash.startsWith('#pool/')) {
const regex = /^#pool\/(\d+\+\d+)(?:\/(.+))?$/,
match = regex.exec(location.hash),
member: any = { id: match![1], blocking: match![2] },
range = poolRangeStorage.get(member.id);
match = regex.exec(location.hash),
member: any = { id: match![1], blocking: match![2] },
range = poolRangeStorage.get(member.id);
if (range) member.range = range;
if (match) {
this.setTab('pools');