Open thanhnguyen2187 opened 7 months ago
On src/lib/utilities/persistence.ts, there is createLocalSnippetStoreV2 which uses .subscribe without subscription:
src/lib/utilities/persistence.ts
createLocalSnippetStoreV2
.subscribe
stores.subscribe( // TODO: fix the typing of `globalState` and `migrationState`, which both // have the type `GlobalState | MigrationState` async ([globalState, migrationState]) => { if (migrationState === 'done') { const dbSnippets = await querySnippetsByFolderId(db, folderId) const snippetIds = dbSnippets.map(snippet => snippet.id) const tags = await queryTagsBySnippetIds(db, snippetIds) const tagsMap = buildTagsMap(tags) snippets = dbSnippets.map( (dbSnippet) => dbSnippetToDisplaySnippet(dbSnippet, tagsMap) ) store.set(snippets) } } )
We should check other places as well.
On
src/lib/utilities/persistence.ts
, there iscreateLocalSnippetStoreV2
which uses.subscribe
without subscription:We should check other places as well.