Skip to content

Commit

Permalink
fix(count): remove include from options
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaticaq committed Dec 3, 2018
1 parent dcac765 commit 343a0e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SequelizePaginate {
return acc
}, {})
const countOptions = Object.keys(options).reduce((acc, key) => {
if (!['order', 'attributes'].includes(key)) {
if (!['order', 'attributes', 'include'].includes(key)) {
acc[key] = params[key]
}
return acc
Expand All @@ -51,7 +51,9 @@ class SequelizePaginate {
console.warn(`(sequelize-pagination) Warning: limit option is ignored.`)
}
if (params.offset) {
console.warn(`(sequelize-pagination) Warning: offset option is ignored.`)
console.warn(
`(sequelize-pagination) Warning: offset option is ignored.`
)
}
/* eslint-enable no-console */
if (params.order) options.order = params.order
Expand Down

0 comments on commit 343a0e5

Please sign in to comment.