mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-26 08:36:42 +08:00
chore: notify user the config coming from the database is in the wrong format
This commit is contained in:
parent
c1afd13362
commit
f4bfe27175
1 changed files with 6 additions and 0 deletions
|
@ -109,6 +109,12 @@ export async function initSnapshot(): Promise<
|
|||
};
|
||||
}
|
||||
|
||||
if (configData !== null && !("config" in configData)) {
|
||||
throw new Error(
|
||||
"Config data is not in the correct format. Please refresh the page or contact support."
|
||||
);
|
||||
}
|
||||
|
||||
snap.name = userData.name;
|
||||
snap.personalBests = userData.personalBests;
|
||||
snap.personalBests ??= {
|
||||
|
|
Loading…
Add table
Reference in a new issue