diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2018-12-11 20:36:55 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-11 20:36:55 +0900 |
| commit | 125849673a1aba46021852ee473d00f4520d1bd6 (patch) | |
| tree | e30d39490236df402b97a9963dafa44eaf549368 /src/server/api/stream/index.ts | |
| parent | Fix error (diff) | |
| download | misskey-125849673a1aba46021852ee473d00f4520d1bd6.tar.gz misskey-125849673a1aba46021852ee473d00f4520d1bd6.tar.bz2 misskey-125849673a1aba46021852ee473d00f4520d1bd6.zip | |
Use for-of instead of forEach (#3583)
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Diffstat (limited to 'src/server/api/stream/index.ts')
| -rw-r--r-- | src/server/api/stream/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index 3119e20af8..22f7646cb9 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -213,8 +213,8 @@ export default class Connection { */ @autobind public dispose() { - this.channels.forEach(c => { - if (c.dispose) c.dispose(); - }); + for (const c of this.channels.filter(c => c.dispose)) { + c.dispose(); + } } } |