diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index a5a09945fa..17449d9647 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -1835,13 +1835,11 @@ function loadPartTable(table, url, options={}) { field: 'category_detail', title: '{% trans "Category" %}', formatter: function(value, row) { - - var text = shortenString(row.category_detail.pathstring); - - if (row.category) { + if (row.category && row.category_detail) { + var text = shortenString(row.category_detail.pathstring); return withTitle(renderLink(text, `/part/category/${row.category}/`), row.category_detail.pathstring); } else { - return '{% trans "No category" %}'; + return '{% trans "No category" %}'; } } };