- fixed visual error where empty entries where shown as null

This commit is contained in:
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({})
.then((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 });
})
.catch((err) => {