From cbe691a0c60a4b8610d09acb7cbe4090bd1569a0 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 2 Dec 2018 22:32:09 +0900 Subject: [PATCH] Merge if-statements (#3478) --- src/remote/activitypub/kernel/like.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index 17ec73f12..57d1c37fa 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -21,10 +21,8 @@ export default async (actor: IRemoteUser, activity: ILike) => { let reaction = 'pudding'; // 他のMisskeyインスタンスからのリアクション - if (activity._misskey_reaction) { - if (validateReaction.ok(activity._misskey_reaction)) { - reaction = activity._misskey_reaction; - } + if (activity._misskey_reaction && validateReaction.ok(activity._misskey_reaction)) { + reaction = activity._misskey_reaction; } await create(actor, note, reaction);