This commit is contained in:
Alexis Lahouze 2016-04-12 10:45:04 +02:00
parent 12fda9d41c
commit 729a061d02
1 changed files with 1 additions and 0 deletions

View File

@ -109,6 +109,7 @@ angular.module('accountant.accounts', [
*/
$scope.cancelEdit = function(rowform, account, $index) {
if(!account.id) {
// Account not saved, just remove it from array.
$scope.accounts.splice($index, 1);
} else {
rowform.$cancel();