From 19252467cbd91920eb897cd6439f186b72b0df68 Mon Sep 17 00:00:00 2001 From: Brikaa Date: Fri, 15 Oct 2021 16:57:11 +0200 Subject: [PATCH] Use some() instead of filter() in v2.js --- api/src/api/v2.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/src/api/v2.js b/api/src/api/v2.js index d6cd3f2..4f0c3e2 100644 --- a/api/src/api/v2.js +++ b/api/src/api/v2.js @@ -99,8 +99,7 @@ function get_job(body) { if ( rt.language !== 'file' && - files.filter(file => !file.encoding || file.encoding === 'utf8') - .length === 0 + !files.some(file => !file.encoding || file.encoding === 'utf8') ) { return reject({ message: 'files must include at least one utf8 encoded file',