Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Commit

Permalink
improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
tabcat committed Mar 31, 2020
1 parent a71d2d2 commit 4e3c306
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ class Store {
}

async _addOperation (data, { onProgressCallback, pin = false } = {}) {
return this._opqueue.add(async () => {
async function addOperation () {
if (this._oplog) {
// check local cache?
if (this.options.syncLocal) {
Expand All @@ -501,7 +501,8 @@ class Store {
if (onProgressCallback) onProgressCallback(entry)
return entry.hash
}
})
}
return this._opqueue.add(addOperation.bind(this))
}

_addOperationBatch (data, batchOperation, lastOperation, onProgressCallback) {
Expand Down

0 comments on commit 4e3c306

Please sign in to comment.