mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05: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
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ module.exports.enabledHelper = function enabledHelper(options, callback) {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.enabledMiddleware = flag => (req, res, next) => {
|
module.exports.enabledMiddleware = flag => (req, res, next) => {
|
||||||
if (this.isSet(flag) === true) {
|
if (module.exports.isSet(flag) === true) {
|
||||||
return next();
|
return next();
|
||||||
} else {
|
} else {
|
||||||
return next(new errors.NotFoundError());
|
return next(new errors.NotFoundError());
|
||||||
|
|
Loading…
Add table
Reference in a new issue