fix: null case handling

This commit is contained in:
Julian Lam
2024-06-17 16:01:36 -04:00
parent 6e2178b0dc
commit e6e6c2a28a

View File

@@ -13,7 +13,7 @@ Instances.getCount = async () => db.sortedSetCard('instances:lastSeen');
Instances.isAllowed = async (domain) => {
let { activitypubFilter: type, activitypubFilterList: list } = meta.config;
list = new Set(list.split('\n'));
list = new Set(String(list).split('\n'));
// eslint-disable-next-line no-bitwise
return list.has(domain) ^ !type;
};