Storage/getItemsState: Warn if not ready, log on success as well

This commit is contained in:
Scott Nonnenberg 2022-09-01 18:05:47 -07:00 committed by GitHub
parent 6c9848efcd
commit 6dd2b73855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,12 @@ export class Storage implements StorageInterface {
}
public getItemsState(): Partial<Access> {
if (!this.ready) {
log.warn('Called getItemsState before storage is ready');
}
log.info('Storage/getItemsState: now preparing copy of items...');
const state = Object.create(null);
// TypeScript isn't smart enough to figure out the types automatically.