0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Merge pull request #3006 from sebgie/issue#3004

Fix limit parameter
This commit is contained in:
Hannah Wolfe 2014-06-20 14:01:10 +01:00
commit 9145d3cfc1

View file

@ -286,6 +286,10 @@ Post = ghostBookshelf.Model.extend({
var postCollection = Posts.forge(), var postCollection = Posts.forge(),
tagInstance = options.tag !== undefined ? Tag.forge({slug: options.tag}) : false; tagInstance = options.tag !== undefined ? Tag.forge({slug: options.tag}) : false;
if (options.limit) {
options.limit = parseInt(options.limit) || 15;
}
options = this.filterOptions(options, 'findPage'); options = this.filterOptions(options, 'findPage');
// Set default settings for options // Set default settings for options