diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index db75386118..0648798316 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -679,19 +679,19 @@ function partStockLabel(part, options={}) { bg_class = 'bg-success'; } - // Display units next to stock badge - let unit_badge = ''; + let output = ''; + // Display units next to stock badge if (units && !options.no_units) { - unit_badge = `{% trans "Unit" %}: ${units} `; + output += `{% trans "Unit" %}: ${units} `; } if (elements.length > 0) { let text = elements.join(' | '); - return `${unit_badge}${text}`; - } else { - return ''; + output += `${text}`; } + + return output; }