- fixed visual error where empty entries where shown as null

This commit is contained in:
Sören Oesterwind 2023-07-07 15:43:02 +02:00
parent 45bec04007
commit 587dac99c5
2 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,12 @@ function get(req: Request, res: Response) {
.findMany({}) .findMany({})
.then((items) => { .then((items) => {
// Count amount of total items // Count amount of total items
// Replace "null" with an empty string
items.forEach((item) => {
if (item.description == null || item.description == "null") {
item.description = '';
}
});
res.render(__path + '/src/frontend/manage/categoryManager.eta.html', { items: items }); res.render(__path + '/src/frontend/manage/categoryManager.eta.html', { items: items });
}) })
.catch((err) => { .catch((err) => {

View File

@ -4,9 +4,9 @@ function randomInRange(min, max) {
function doTheConfetti() { function doTheConfetti() {
confetti({ confetti({
angle: 100, angle: randomInRange(90, 110),
spread: randomInRange(70, 120), spread: randomInRange(70, 120),
particleCount: randomInRange(100, 200), particleCount: randomInRange(100, 200),
origin: { y: 0.6 } origin: { y: 0.6, x: randomInRange(0.4, 0.8) },
}); });
} }