Skip to content

Node.js based forum software built for the modern web

refactor: get rid of noop

Barış Soner Uşaklıeaf435413ef9
diff --git a/src/api/activitypub.js b/src/api/activitypub.js
index b14a2e4f44..cf06c7a3fe 100644
--- a/src/api/activitypub.js
+++ b/src/api/activitypub.js
@@ -21,15 +21,11 @@ const utils = require('../utils');
const activitypubApi = module.exports;
-function noop() {}
-
function enabledCheck(next) {
return async function (caller, params) {
- if (!meta.config.activitypubEnabled) {
- return noop;
+ if (meta.config.activitypubEnabled) {
+ await next(caller, params);
}
-
- await next(caller, params);
};
}