fix "new game" button with rating range
This commit is contained in:
parent
f017c6dec6
commit
299a2d1232
|
@ -63,8 +63,9 @@ export default function LichessLobby(opts: LobbyOpts) {
|
|||
lichess.StrongSocket.firstConnect.then(() => {
|
||||
const gameId = getParameterByName('hook_like');
|
||||
if (!gameId) return;
|
||||
const ratingRange = lobby.setup.stores.hook.get()?.ratingRange;
|
||||
xhr.text(
|
||||
`/setup/hook/${lichess.sri}/like/${gameId}?rr=${lobby.setup.ratingRange() || ''}`,
|
||||
`/setup/hook/${lichess.sri}/like/${gameId}?rr=${ratingRange || ''}`,
|
||||
{ method: 'post' });
|
||||
lobby.setTab('real_time');
|
||||
history.replaceState(null, '', '/');
|
||||
|
|
|
@ -203,6 +203,7 @@ export default class Setup {
|
|||
rating + parseInt(form.ratingRange_range_min.value),
|
||||
rating + parseInt(form.ratingRange_range_max.value)
|
||||
].join('-');
|
||||
save();
|
||||
const poolMember = this.hookToPoolMember(color, form);
|
||||
modal.close();
|
||||
if (poolMember) {
|
||||
|
|
Loading…
Reference in a new issue