0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Fix limit parameter

closes #3004
- parseInt for limit parameter
This commit is contained in:
Sebastian Gierlinger 2014-06-20 14:28:01 +02:00
parent 0c00692799
commit 22c05da93a

View file

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