fix: do not leak data in easy mode
This commit is contained in:
parent
111b9c4ff0
commit
a221e6bacc
1 changed files with 5 additions and 1 deletions
|
@ -37,6 +37,10 @@ export const load: PageServerLoad = async ({ fetch, url, platform }) => {
|
|||
}
|
||||
});
|
||||
|
||||
const strippedStops = crossingStops.map((f) => {
|
||||
return { ...f, properties: {} };
|
||||
});
|
||||
|
||||
const randomStop = crossingStops[Math.floor(Math.random() * crossingStops.length)];
|
||||
|
||||
if (!randomStop) {
|
||||
|
@ -46,7 +50,7 @@ export const load: PageServerLoad = async ({ fetch, url, platform }) => {
|
|||
const gameId = await createGame(randomStop, kv);
|
||||
const gameData: GameData = {
|
||||
lines: options.mode === "easy" || options.mode === "hard" ? lineColors : [],
|
||||
stops: options.mode === "easy" ? crossingStops : [],
|
||||
stops: options.mode === "easy" ? strippedStops : [],
|
||||
stopName: randomStop.properties!.nom,
|
||||
gameId,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue