Merge pull request #2888 from SchrodingersGat/null-label-fix

Prevent "null" from being displayed as part units
This commit is contained in:
Oliver 2022-04-28 10:12:06 +10:00 committed by GitHub
commit 52aaa78bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,6 +500,11 @@ function duplicateBom(part_id, options={}) {
*/
function partStockLabel(part, options={}) {
// Prevent literal string 'null' from being displayed
if (part.units == null) {
part.units = '';
}
if (part.in_stock) {
// There IS stock available for this part