mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
accept limit = 0 to signify "no limit"
This commit is contained in:
parent
97804989a3
commit
035d5c51c9
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +20,8 @@ getPostsParameters = function (terms) {
|
|||
// extend sort to sort posts by _id to break ties
|
||||
deepExtend(true, parameters, {options: {sort: {_id: -1}}});
|
||||
|
||||
// if there is a limit and it's not null, add it too
|
||||
if (typeof terms.limit !== 'undefined' && !!terms.limit)
|
||||
// if there is a limit, add it too (note: limit=0 means "no limit")
|
||||
if (typeof terms.limit !== 'undefined')
|
||||
_.extend(parameters.options, {limit: parseInt(terms.limit)});
|
||||
|
||||
// hide future scheduled posts unless "showFuture" is set to true or postedAt is already defined
|
||||
|
|
Loading…
Add table
Reference in a new issue