mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Updated permittedOptions to correctly call super
refs #9881 When subclassing and calling "super" you must explicitly pass the this context and any parameters
This commit is contained in:
parent
b326cfaab7
commit
2cb8d06fca
@ -34,7 +34,7 @@ App = ghostBookshelf.Model.extend({
|
||||
* @return {Array} Keys allowed in the `options` hash of the model's method.
|
||||
*/
|
||||
permittedOptions: function permittedOptions(methodName) {
|
||||
var options = ghostBookshelf.Model.permittedOptions(),
|
||||
var options = ghostBookshelf.Model.permittedOptions.call(this, methodName),
|
||||
|
||||
// whitelists for the `options` hash argument on methods, by method name.
|
||||
// these are the only options that can be passed to Bookshelf / Knex.
|
||||
|
@ -32,7 +32,7 @@ Client = ghostBookshelf.Model.extend({
|
||||
* @return {Array} Keys allowed in the `options` hash of the model's method.
|
||||
*/
|
||||
permittedOptions: function permittedOptions(methodName) {
|
||||
var options = ghostBookshelf.Model.permittedOptions(),
|
||||
var options = ghostBookshelf.Model.permittedOptions.call(this, methodName),
|
||||
|
||||
// whitelists for the `options` hash argument on methods, by method name.
|
||||
// these are the only options that can be passed to Bookshelf / Knex.
|
||||
|
@ -554,7 +554,7 @@ Post = ghostBookshelf.Model.extend({
|
||||
* @return {Array} Keys allowed in the `options` hash of the model's method.
|
||||
*/
|
||||
permittedOptions: function permittedOptions(methodName) {
|
||||
var options = ghostBookshelf.Model.permittedOptions(methodName),
|
||||
var options = ghostBookshelf.Model.permittedOptions.call(this, methodName),
|
||||
|
||||
// whitelists for the `options` hash argument on methods, by method name.
|
||||
// these are the only options that can be passed to Bookshelf / Knex.
|
||||
|
@ -24,7 +24,7 @@ Role = ghostBookshelf.Model.extend({
|
||||
* @return {Array} Keys allowed in the `options` hash of the model's method.
|
||||
*/
|
||||
permittedOptions: function permittedOptions(methodName) {
|
||||
var options = ghostBookshelf.Model.permittedOptions(),
|
||||
var options = ghostBookshelf.Model.permittedOptions.call(this, methodName),
|
||||
|
||||
// whitelists for the `options` hash argument on methods, by method name.
|
||||
// these are the only options that can be passed to Bookshelf / Knex.
|
||||
|
@ -43,7 +43,7 @@ Subscriber = ghostBookshelf.Model.extend({
|
||||
},
|
||||
|
||||
permittedOptions: function permittedOptions(methodName) {
|
||||
var options = ghostBookshelf.Model.permittedOptions(),
|
||||
var options = ghostBookshelf.Model.permittedOptions.call(this, methodName),
|
||||
|
||||
// whitelists for the `options` hash argument on methods, by method name.
|
||||
// these are the only options that can be passed to Bookshelf / Knex.
|
||||
|
@ -92,7 +92,7 @@ Tag = ghostBookshelf.Model.extend({
|
||||
},
|
||||
|
||||
permittedOptions: function permittedOptions(methodName) {
|
||||
var options = ghostBookshelf.Model.permittedOptions(methodName),
|
||||
var options = ghostBookshelf.Model.permittedOptions.call(this, methodName),
|
||||
|
||||
// whitelists for the `options` hash argument on methods, by method name.
|
||||
// these are the only options that can be passed to Bookshelf / Knex.
|
||||
|
@ -328,7 +328,7 @@ User = ghostBookshelf.Model.extend({
|
||||
* @return {Array} Keys allowed in the `options` hash of the model's method.
|
||||
*/
|
||||
permittedOptions: function permittedOptions(methodName, options) {
|
||||
var permittedOptionsToReturn = ghostBookshelf.Model.permittedOptions(methodName),
|
||||
var permittedOptionsToReturn = ghostBookshelf.Model.permittedOptions.call(this, methodName),
|
||||
|
||||
// whitelists for the `options` hash argument on methods, by method name.
|
||||
// these are the only options that can be passed to Bookshelf / Knex.
|
||||
|
Loading…
Reference in New Issue
Block a user