mirror of
https://github.com/jambonz/chrome-extension-dialer.git
synced 2026-01-25 02:08:05 +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);
|
JSON.parse(str);
|
||||||
|
|
||||||
const activeSettings = parsed.find((el) => el.active);
|
const activeSettings = parsed.find((el) => el.active);
|
||||||
const decoded = {
|
if (activeSettings) {
|
||||||
active: activeSettings?.active,
|
const decoded = {
|
||||||
decoded: JSON.parse(
|
active: activeSettings?.active,
|
||||||
Buffer.from(activeSettings?.encoded!, "base64").toString("utf-8")
|
decoded: JSON.parse(
|
||||||
),
|
Buffer.from(activeSettings?.encoded!, "base64").toString("utf-8")
|
||||||
id: activeSettings?.id,
|
),
|
||||||
};
|
id: activeSettings?.id,
|
||||||
return decoded as IAppSettings;
|
};
|
||||||
|
return decoded as IAppSettings;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {} as IAppSettings;
|
return {} as IAppSettings;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user