mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Reload the page if a stock row cannot be found by id (references #506)
This commit is contained in:
parent
99d4b05a3c
commit
b4997abf75
@ -119,6 +119,12 @@ function RefreshStockDetailRow(stockRowId)
|
||||
function(result)
|
||||
{
|
||||
var stockRow = $('#stock-' + stockRowId + '-row');
|
||||
|
||||
// If the stock row not exists / is invisible (happens after consume/undo because the undone new stock row has different id), just reload the page for now
|
||||
if (!stockRow.length || stockRow.hasClass("d-none"))
|
||||
{
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
if (result == null || result.amount == 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user