mirror of
https://github.com/appy-one/acebase.git
synced 2026-06-30 06:02:02 -06:00
Promises to async
This commit is contained in:
parent
2b0fca3aea
commit
142fd3c7f2
1 changed files with 3 additions and 4 deletions
|
|
@ -17,11 +17,10 @@ export function createLocalStorageInstance(dbname: string, init: Partial<LocalSt
|
|||
locking: true,
|
||||
removeVoidProperties: settings.removeVoidProperties,
|
||||
maxInlineValueSize: settings.maxInlineValueSize,
|
||||
ready() {
|
||||
async ready() {
|
||||
// LocalStorage is always ready
|
||||
return Promise.resolve();
|
||||
},
|
||||
getTransaction(target: { path: string; write: boolean }) {
|
||||
async getTransaction(target: { path: string; write: boolean }) {
|
||||
// Create an instance of our transaction class
|
||||
const context = {
|
||||
debug: true,
|
||||
|
|
@ -29,7 +28,7 @@ export function createLocalStorageInstance(dbname: string, init: Partial<LocalSt
|
|||
localStorage,
|
||||
};
|
||||
const transaction = new LocalStorageTransaction(context, target);
|
||||
return Promise.resolve(transaction);
|
||||
return transaction;
|
||||
},
|
||||
});
|
||||
const db = new AceBase(dbname, { logLevel: settings.logLevel, storage: storageSettings, sponsor: settings.sponsor });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue