fixed null setting if remove active account

This commit is contained in:
Quan HL
2024-09-17 06:39:34 +07:00
parent e6b8903f36
commit 8af172d527

View File

@@ -126,6 +126,7 @@ export const getActiveSettings = (): IAppSettings => {
JSON.parse(str);
const activeSettings = parsed.find((el) => el.active);
if (activeSettings) {
const decoded = {
active: activeSettings?.active,
decoded: JSON.parse(
@@ -135,6 +136,7 @@ export const getActiveSettings = (): IAppSettings => {
};
return decoded as IAppSettings;
}
}
return {} as IAppSettings;
};