Add catch to image grid generator
Some checks failed
Deploy To Production / build (push) Failing after 20s
Deploy To Production / deploy (push) Has been skipped

This commit is contained in:
Ethan Lane 2025-04-23 10:40:06 +01:00
parent 1796f2519e
commit 659906e562

View file

@ -26,6 +26,7 @@ export default class ImageHelper {
const ctx = canvas.getContext("2d");
for (let i = 0; i < cards.length; i++) {
try {
const card = cards[i];
const filePath = path.join(process.env.DATA_DIR!, "cards", card.path);
@ -67,6 +68,10 @@ export default class ImageHelper {
ctx.drawImage(image, imageX, imageY);
}
catch (e) {
AppLogger.CatchError("ImageHelper", e);
}
}
return canvas.toBuffer();
}