Skip to content

Commit 5104a3d

Browse files
authoredJul 4, 2022
Merge pull request #176 from lau1944/master
feat: remove defaultOptions in subdoc pagination process #174
2 parents e006105 + 5cec196 commit 5104a3d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎src/pagination-subdocs.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,17 @@ function paginateSubDocs(query, options, callback) {
111111
});
112112
}
113113

114-
// options = Object.assign(options, {
115-
// customLabels: defaultOptions.customLabels,
116-
// });
117-
118114
// options properties for main document query
119115
const {
120116
populate,
121117
read = {},
122118
select = '',
123119
pagination = true,
124120
pagingOptions,
121+
projection,
125122
} = options;
126123

127-
const mQuery = this.findOne(query, options.projection);
124+
const mQuery = this.findOne(query, projection);
128125

129126
if (read && read.pref) {
130127
/**

0 commit comments

Comments
 (0)
Please sign in to comment.