mirror of
https://github.com/Febbweiss/CloudBudget.git
synced 2026-03-04 22:35:38 +00:00
Fix: test entries list size to compute balance
This commit is contained in:
@@ -88,7 +88,7 @@ var list_entries = function(account_id, entry, callback ) {
|
|||||||
return callback( null, {
|
return callback( null, {
|
||||||
entry: entry,
|
entry: entry,
|
||||||
entries: entries,
|
entries: entries,
|
||||||
balance: data ? data[0].balance : 0
|
balance: data && data.length > 0 ? data[0].balance : 0
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user