Default Fame Selection Fix
This commit is contained in:
parent
98d7bc5567
commit
0fdc4c07f6
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
import Header from './Header.svelte';
|
||||
import './styles.css';
|
||||
import AdminSelectedGameStore from '$lib/stores/admin-page/GameStore';
|
||||
import type { ChellarisGameInfo } from '$lib/types/chellaris';
|
||||
|
||||
$: {
|
||||
fetch(apiBaseUrl + '/v3/ethics').then((res) => {
|
||||
|
@ -19,9 +20,9 @@
|
|||
});
|
||||
|
||||
fetch(apiBaseUrl + '/v3/games').then((res) => {
|
||||
res.json().then((data) => {
|
||||
res.json().then((data: { [key: number]: ChellarisGameInfo }) => {
|
||||
if ($AdminSelectedGameStore == 1) {
|
||||
$AdminSelectedGameStore = data[0].id;
|
||||
$AdminSelectedGameStore = Object.values(data)[0].id;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Reference in a new issue