Fixed profile merge breaking if no main profile is available.
This commit is contained in:
@@ -126,6 +126,10 @@ async function fetchProfiles(actorIdsOrNames, { knex }) {
|
||||
}
|
||||
|
||||
function mergeMainProfile(profile, mainProfile) {
|
||||
if (!mainProfile) {
|
||||
return profile;
|
||||
}
|
||||
|
||||
const preservedKeys = ['id'];
|
||||
|
||||
const mergedProfile = Object.fromEntries(Object.entries(profile).map(([key, value]) => [key, mainProfile[key] === null || preservedKeys.includes(key)
|
||||
|
||||
Reference in New Issue
Block a user