From 125849673a1aba46021852ee473d00f4520d1bd6 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Tue, 11 Dec 2018 20:36:55 +0900 Subject: Use for-of instead of forEach (#3583) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: syuilo Co-authored-by: Acid Chicken (硫酸鶏) --- src/server/api/endpoints/notes/polls/vote.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/api/endpoints/notes/polls') diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts index dc012152c6..8de0eb420e 100644 --- a/src/server/api/endpoints/notes/polls/vote.ts +++ b/src/server/api/endpoints/notes/polls/vote.ts @@ -102,12 +102,12 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { } }) .then(watchers => { - watchers.forEach(watcher => { + for (const watcher of watchers) { notify(watcher.userId, user._id, 'poll_vote', { noteId: note._id, choice: ps.choice }); - }); + } }); // この投稿をWatchする -- cgit v1.2.3-freya