fix: another crash

This commit is contained in:
Barış Soner Uşaklı
2024-06-07 11:55:21 -04:00
parent eaf435413e
commit f8d9f644e6
2 changed files with 3 additions and 3 deletions

View File

@@ -122,7 +122,7 @@ Actors.assert = async (ids, options = {}) => {
actors = actors.filter(Boolean); // remove unresolvable actors
// Build userData object for storage
const profiles = await activitypub.mocks.profile(actors);
const profiles = (await activitypub.mocks.profile(actors)).filter(Boolean);
const now = Date.now();
const bulkSet = profiles.reduce((memo, profile) => {

View File

@@ -29,7 +29,7 @@ const sanitizeConfig = {
Mocks.profile = async (actors) => {
// Should only ever be called by activitypub.actors.assert
const profiles = (await Promise.all(actors.map(async (actor) => {
const profiles = await Promise.all(actors.map(async (actor) => {
if (!actor) {
return null;
}
@@ -78,7 +78,7 @@ Mocks.profile = async (actors) => {
};
return payload;
})));
}));
return profiles;
};