0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added processOptions check to base model findPage

no-issue

When calling findPage on a model with no processOptions defined this
throws an error.
This commit is contained in:
Fabien O'Carroll 2018-10-03 15:18:52 +07:00 committed by Nazar Gargol
parent 079b41e608
commit 15da580016

View file

@ -695,7 +695,9 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
// This applies default properties like 'staticPages' and 'status'
// And then converts them to 'where' options... this behaviour is effectively deprecated in favour
// of using filter - it's only be being kept here so that we can transition cleanly.
this.processOptions(options);
if (this.processOptions) {
this.processOptions(options);
}
// Add Filter behaviour
itemCollection.applyDefaultAndCustomFilters(options);