fix prefsDb init

This commit is contained in:
tophf 2022-01-28 20:25:01 +03:00
parent bba0c9d7a1
commit 37c750fbba
2 changed files with 9 additions and 6 deletions

View File

@ -155,12 +155,6 @@ addAPI(/** @namespace API */ {
getValues: () => prefs.__values, // will be deepCopy'd by apiHandler
set: prefs.set,
},
/**
* Storage for big items that may exceed 8kB limit of chrome.storage.sync.
* To make an item syncable register it with uuidIndex.addCustomId.
*/
prefsDb: db.open(prefs.STORAGE_KEY),
});
//#endregion

View File

@ -1,5 +1,7 @@
/* global addAPI */// common.js
/* global chromeLocal */// storage-util.js
/* global cloneError */// worker-util.js
/* global prefs */
'use strict';
/*
@ -29,6 +31,13 @@ const db = (() => {
dbName === DB
? 'styles'
: 'data';
addAPI(/** @namespace API */ {
/**
* Storage for big items that may exceed 8kB limit of chrome.storage.sync.
* To make an item syncable register it with uuidIndex.addCustomId.
*/
prefsDb: getProxy(prefs.STORAGE_KEY),
});
return {
styles: getProxy(),
open: getProxy,