diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-09 19:46:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-09 19:46:33 +0200 |
commit | 04646029785f25202cfdcb8d5a1d31948244ac7a (patch) | |
tree | fc16372bc70f209a93d72b84aa3115eac572d9dc /streaming | |
parent | 9b03cf0ddd73c259d301619d39b6019bb6c8a9d5 (diff) |
Fix issue with some Node.js versions not having Array.prototype.includes (#3667)
by using Array.prototype.indexOf instead
Diffstat (limited to 'streaming')
-rw-r--r-- | streaming/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/streaming/index.js b/streaming/index.js index d77ca63ff..270ed6f70 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -276,7 +276,7 @@ const startWorker = (workerId) => { const targetAccountIds = [unpackedPayload.account.id].concat(unpackedPayload.mentions.map(item => item.id)); const accountDomain = unpackedPayload.account.acct.split('@')[1]; - if (Array.isArray(req.filteredLanguages) && req.filteredLanguages.includes(unpackedPayload.language)) { + if (Array.isArray(req.filteredLanguages) && req.filteredLanguages.indexOf(unpackedPayload.language) !== -1) { log.silly(req.requestId, `Message ${unpackedPayload.id} filtered by language (${unpackedPayload.language})`); done(); return; |