mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-26 15:54:35 +08:00
chore: using new function from the previous commit
This commit is contained in:
parent
4bbe321dfe
commit
c65b13e8aa
1 changed files with 4 additions and 11 deletions
|
@ -144,19 +144,12 @@ export async function initSnapshot(): Promise<
|
|||
// LoadingPage.updateBar(32);
|
||||
// }
|
||||
// LoadingPage.updateText("Downloading config...");
|
||||
if (configData !== undefined && configData !== null) {
|
||||
const newConfig = {
|
||||
if (configData === undefined || configData === null) {
|
||||
snap.config = {
|
||||
...DefaultConfig,
|
||||
};
|
||||
|
||||
for (const key in configData.config) {
|
||||
const value = configData.config[key];
|
||||
(newConfig[
|
||||
key as keyof MonkeyTypes.Config
|
||||
] as typeof configData[typeof key]) = value;
|
||||
}
|
||||
|
||||
snap.config = newConfig;
|
||||
} else {
|
||||
snap.config = mergeWithDefaultConfig(configData.config);
|
||||
}
|
||||
// if (ActivePage.get() === "loading") {
|
||||
// LoadingPage.updateBar(67.5);
|
||||
|
|
Loading…
Reference in a new issue