- fixed visual error where empty entries where shown as null
This commit is contained in:
parent
45bec04007
commit
587dac99c5
@ -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) => {
|
||||||
|
@ -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) },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user