mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +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
@ -120,6 +120,12 @@ function RefreshStockDetailRow(stockRowId)
|
||||
{
|
||||
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)
|
||||
{
|
||||
stockRow.fadeOut(500, function()
|
||||
|
Loading…
x
Reference in New Issue
Block a user