From a53e0d9f732a1d198f780f0900b9f99bbfbb39f6 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 23 Dec 2018 23:23:56 +0900 Subject: [PATCH] Fix error in featuredNotes (#3730) --- src/remote/activitypub/models/person.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index ec9455ca0..f6c30ffb2 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -441,7 +441,7 @@ export async function updateFeatured(userId: mongo.ObjectID) { await User.update({ _id: user._id }, { $set: { - pinnedNoteIds: featuredNotes.map(note => note._id) + pinnedNoteIds: featuredNotes.filter(note => note != null).map(note => note._id) } }); }