Fix to the Fix

This commit is contained in:
Neshura 2023-09-12 19:35:20 +02:00
parent 0bdbe2b681
commit afe8416b73
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -44,7 +44,7 @@ export const load: LayoutLoad = async ({ fetch }) => {
if (typeof gameGroupSelections[gameSelection] === 'undefined') { if (typeof gameGroupSelections[gameSelection] === 'undefined') {
// Default to all available groups // Default to all available groups
gameGroupSelections[gameSelection] = { gameId: gameSelection, selectedGroups: Object.fromEntries(Object.values(Object.values(chellarisData.games)[gameSelection].groups).map((group) => group.id).entries()) }; gameGroupSelections[gameSelection] = { gameId: gameSelection, selectedGroups: Object.fromEntries(Object.values(chellarisData.games[gameSelection].groups).map((group) => group.id).entries()) };
// Set Local Storage to default Values if not previously defined // Set Local Storage to default Values if not previously defined
localStorage.setItem('gameGroupSelection', JSON.stringify(gameGroupSelections)); localStorage.setItem('gameGroupSelection', JSON.stringify(gameGroupSelections));
@ -73,7 +73,7 @@ export const load: LayoutLoad = async ({ fetch }) => {
if (typeof gameGroupSelections[gameSelection] === 'undefined') { if (typeof gameGroupSelections[gameSelection] === 'undefined') {
// Default to all available groups // Default to all available groups
gameGroupSelections[gameSelection] = { gameId: gameSelection, selectedGroups: Object.fromEntries(Object.values(Object.values(chellarisData.games)[gameSelection].groups).map((group) => group.id).entries()) }; gameGroupSelections[gameSelection] = { gameId: gameSelection, selectedGroups: Object.fromEntries(Object.values(chellarisData.games[gameSelection].groups).map((group) => group.id).entries()) };
} }
SelectedGameGroupsStore.set(gameGroupSelections); SelectedGameGroupsStore.set(gameGroupSelections);