Added length filter

This commit is contained in:
Gleb Koval 2021-07-19 02:40:54 +01:00
parent c55f3d7bd9
commit 6c89ca79fe
No known key found for this signature in database
GPG Key ID: 120F2F6DA9D995FB
1 changed files with 16 additions and 14 deletions

View File

@ -58,7 +58,8 @@ export async function get(
let d: [string, number, number][][] = data; let d: [string, number, number][][] = data;
res.end( res.end(
JSON.stringify( JSON.stringify(
d.map((values, idx) => { d
.map((values, idx) => {
return values.filter(value => { return values.filter(value => {
return ( return (
idx === 0 || idx === 0 ||
@ -72,6 +73,7 @@ export async function get(
); );
}); });
}) })
.filter(v => v.length > 0)
) )
); );
} }