summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/kernel/remove
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2019-04-13 01:43:22 +0900
committerGitHub <noreply@github.com>2019-04-13 01:43:22 +0900
commit987168b863c52d0548050ffbac569782bb9a8cef (patch)
treec9aa2243dcdcbd044688d201a51c601574bff259 /src/remote/activitypub/kernel/remove
parentFix bug (diff)
downloadsharkey-987168b863c52d0548050ffbac569782bb9a8cef.tar.gz
sharkey-987168b863c52d0548050ffbac569782bb9a8cef.tar.bz2
sharkey-987168b863c52d0548050ffbac569782bb9a8cef.zip
strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
Diffstat (limited to 'src/remote/activitypub/kernel/remove')
-rw-r--r--src/remote/activitypub/kernel/remove/index.ts1
1 files changed, 1 insertions, 0 deletions
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<void> => {
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;
}