base_config: Don't throw if loaded config file is empty

This commit is contained in:
Scott Nonnenberg 2021-10-25 12:41:44 -07:00 committed by GitHub
parent 53bc13a401
commit be862afd1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 90 additions and 9 deletions

View file

@ -31,7 +31,6 @@ import * as GlobalErrors from './global_errors';
import { setup as setupSpellChecker } from './spell_check';
import { redactAll, addSensitivePath } from '../ts/util/privacy';
import { consoleLogger } from '../ts/util/consoleLogger';
import { remove as removeUserConfig } from './user_config';
import './startup_config';
@ -1318,7 +1317,7 @@ const onDatabaseError = async (error: string) => {
clipboard.writeText(`Database startup error:\n\n${redactAll(error)}`);
} else {
await sql.removeDB();
removeUserConfig();
userConfig.remove();
app.relaunch();
}