Filter out invalid/broken characters
This commit is contained in:
parent
c9c4f30637
commit
15c81749b8
|
@ -1350,6 +1350,12 @@ app.post("/getcharacters", jsonParser, function (request, response) {
|
|||
let processingPromises = pngFiles.map((file, index) => processCharacter(file, index));
|
||||
await Promise.all(processingPromises); performance.mark('B');
|
||||
|
||||
// Filter out invalid/broken characters
|
||||
characters = Object.values(characters).filter(x => x?.name).reduce((acc, val, index) => {
|
||||
acc[index] = val;
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
response.send(JSON.stringify(characters));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue