diff --git a/actors.mjs b/actors.mjs index f1794ba..8e9fb5d 100644 --- a/actors.mjs +++ b/actors.mjs @@ -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)