mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Load managed settings always when found
This commit is contained in:
parent
9d33016516
commit
49efc287e4
1 changed files with 8 additions and 10 deletions
|
|
@ -63,17 +63,15 @@ page.initSettings = async function() {
|
|||
try {
|
||||
const item = await browser.storage.local.get({ 'settings': {} });
|
||||
|
||||
// Load managed settings if found when extension is started for the first time
|
||||
if (Object.keys(item.settings).length === 0) {
|
||||
try {
|
||||
const managedSettings = await browser.storage.managed.get('settings');
|
||||
if (managedSettings?.settings) {
|
||||
console.log('Managed settings found.');
|
||||
item.settings = managedSettings.settings;
|
||||
}
|
||||
} catch (err) {
|
||||
logError('page.initSettings error: ' + err);
|
||||
// Load managed settings if found
|
||||
try {
|
||||
const managedSettings = await browser.storage.managed.get('settings');
|
||||
if (managedSettings?.settings) {
|
||||
console.log('Managed settings found.');
|
||||
item.settings = managedSettings.settings;
|
||||
}
|
||||
} catch (err) {
|
||||
logError('page.initSettings error: ' + err);
|
||||
}
|
||||
|
||||
page.settings = item.settings;
|
||||
|
|
|
|||
Loading…
Reference in a new issue