Skip to content

Commit

Permalink
fix: Do not read pouch adapter name at login
Browse files Browse the repository at this point in the history
This was adding an I/O for nothing, as we do nothing with the adapter
name anymore.
  • Loading branch information
paultranvan committed Jan 29, 2025
1 parent d265f54 commit b8c1280
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/cozy-pouch-link/src/CozyPouchLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ class PouchLink extends CozyLink {
logger.log('Create pouches with ' + prefix + ' prefix')
}

if (!(await this.storage.getAdapterName())) {
const adapter = get(this.options, 'pouch.options.adapter')
await this.storage.persistAdapterName(adapter)
const adapterName = this.options?.pouch?.options?.adapter
if (adapterName) {
if (!(await this.storage.getAdapterName())) {
await this.storage.persistAdapterName(adapterName)
}
}

this.pouches = new PouchManager(this.doctypes, {
Expand Down

0 comments on commit b8c1280

Please sign in to comment.