mirror of
https://github.com/jambonz/chrome-extension-dialer.git
synced 2025-12-19 04:47:45 +00:00
fixed null setting if remove active account
This commit is contained in:
@@ -126,14 +126,16 @@ export const getActiveSettings = (): IAppSettings => {
|
||||
JSON.parse(str);
|
||||
|
||||
const activeSettings = parsed.find((el) => el.active);
|
||||
const decoded = {
|
||||
active: activeSettings?.active,
|
||||
decoded: JSON.parse(
|
||||
Buffer.from(activeSettings?.encoded!, "base64").toString("utf-8")
|
||||
),
|
||||
id: activeSettings?.id,
|
||||
};
|
||||
return decoded as IAppSettings;
|
||||
if (activeSettings) {
|
||||
const decoded = {
|
||||
active: activeSettings?.active,
|
||||
decoded: JSON.parse(
|
||||
Buffer.from(activeSettings?.encoded!, "base64").toString("utf-8")
|
||||
),
|
||||
id: activeSettings?.id,
|
||||
};
|
||||
return decoded as IAppSettings;
|
||||
}
|
||||
}
|
||||
return {} as IAppSettings;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user