mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Fixed labs.enabledMiddleware isSet reference (#13227)
no-issue The `this` used by enabledMiddleware is not bound to `module.exports`. This updates the middleware to reference the `isSet` method correctly
This commit is contained in:
parent
e4d9c8daf2
commit
26940bea3d
@ -103,7 +103,7 @@ module.exports.enabledHelper = function enabledHelper(options, callback) {
|
||||
};
|
||||
|
||||
module.exports.enabledMiddleware = flag => (req, res, next) => {
|
||||
if (this.isSet(flag) === true) {
|
||||
if (module.exports.isSet(flag) === true) {
|
||||
return next();
|
||||
} else {
|
||||
return next(new errors.NotFoundError());
|
||||
|
Loading…
Reference in New Issue
Block a user