Skip to content

Commit

Permalink
fixed bug in edit which sometimes would not remove the old value
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrachan committed Apr 3, 2013
1 parent d55e1f2 commit 5531b98
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -121,10 +121,13 @@ module Forms {
function removeSelected(data) {
angular.forEach(scope.selectedItems, (selected) => {
var id = selected["_id"];
delete selected["_id"];
if (angular.isArray(data)) {
data = data.remove((value) => Object.equal(value, selected));
} else {
delete selected["_id"];
data = data.remove((value) => Object.equal(value, selected));
}
else {
delete selected["_id"];
if (id) {
delete data[id];
} else {
Expand Down

0 comments on commit 5531b98

Please sign in to comment.