mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
Only do a product by barcode lookup if there is actually any input
This commit is contained in:
parent
e9f2edea75
commit
2b0f5d8d84
|
|
@ -136,7 +136,7 @@ $('#product_id_text_input').on('blur', function(e)
|
|||
var input = $('#product_id_text_input').val().toString();
|
||||
var possibleOptionElement = $("#product_id option[data-additional-searchdata*=\"" + input + ",\"]").first();
|
||||
|
||||
if (GetUriParam('addbarcodetoselection') === undefined && possibleOptionElement.length > 0)
|
||||
if (GetUriParam('addbarcodetoselection') === undefined && input.length > 0 && possibleOptionElement.length > 0)
|
||||
{
|
||||
$('#product_id').val(possibleOptionElement.val());
|
||||
$('#product_id').data('combobox').refresh();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user