mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 12:07:49 +02:00
Use some() instead of filter() in v2.js
This commit is contained in:
parent
821d5496e4
commit
19252467cb
1 changed files with 1 additions and 2 deletions
|
@ -99,8 +99,7 @@ function get_job(body) {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
rt.language !== 'file' &&
|
rt.language !== 'file' &&
|
||||||
files.filter(file => !file.encoding || file.encoding === 'utf8')
|
!files.some(file => !file.encoding || file.encoding === 'utf8')
|
||||||
.length === 0
|
|
||||||
) {
|
) {
|
||||||
return reject({
|
return reject({
|
||||||
message: 'files must include at least one utf8 encoded file',
|
message: 'files must include at least one utf8 encoded file',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue