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

Commit fa69a57

Browse files
authored
Merge pull request #19 from LuigiCerone/fix_fullop
fullOp bug fixed
2 parents 074daa8 + 8d6261d commit fa69a57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DocumentStore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ class DocumentStore extends Store {
3939

4040
query (mapper, options = {}) {
4141
// Whether we return the full operation data or just the db value
42-
const fullOp = options ? options.fullOp : false
42+
const fullOp = options.fullOp || false
4343

4444
return Object.keys(this._index._index)
4545
.map((e) => this._index.get(e, fullOp))
46-
.filter(mapper)
46+
.filter(e => fullOp ? mapper(e.payload.value) : mapper(e))
4747
}
4848

4949
batchPut (docs, onProgressCallback) {

0 commit comments

Comments
 (0)