From 987168b863c52d0548050ffbac569782bb9a8cef Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Apr 2019 01:43:22 +0900 Subject: strictNullChecks (#4666) * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip --- src/remote/activitypub/kernel/remove/index.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/remote/activitypub/kernel/remove') diff --git a/src/remote/activitypub/kernel/remove/index.ts b/src/remote/activitypub/kernel/remove/index.ts index ae33be59dc..32b8d66471 100644 --- a/src/remote/activitypub/kernel/remove/index.ts +++ b/src/remote/activitypub/kernel/remove/index.ts @@ -14,6 +14,7 @@ export default async (actor: IRemoteUser, activity: IRemove): Promise => { if (activity.target === actor.featured) { const note = await resolveNote(activity.object); + if (note == null) throw new Error('note not found'); await removePinned(actor, note.id); return; } -- cgit v1.2.3-freya