BUGFIX: Wrong usage of delete operator in Settings.load (#1791)

This commit is contained in:
catloversg 2024-11-24 06:23:57 +07:00 committed by GitHub
parent 596a621c62
commit 45a6ca6b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -164,8 +164,12 @@ export const Settings = {
save.styles && Object.assign(Settings.styles, save.styles);
save.overview && Object.assign(Settings.overview, save.overview);
save.EditorTheme && Object.assign(Settings.EditorTheme, save.EditorTheme);
delete save.theme, save.styles, save.overview, save.EditorTheme;
Object.assign(Settings, save);
Object.assign(Settings, save, {
theme: Settings.theme,
styles: Settings.styles,
overview: Settings.overview,
EditorTheme: Settings.EditorTheme,
});
/**
* The hostname and port of RFA have not been validated properly, so the save data may contain invalid data. In that
* case, we set them to the default value.