Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fixes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
jkleinsc committed Sep 2, 2014
1 parent a70b2a1 commit b090c54
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions app/visits/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ export default AbstractEditController.extend(PatientSubmodule, UserSession, Visi
* otherwise add the specified object to the list.
*/
updateList: function(listName, listObject, removeObject) {
var list = this.get(listName);
if (removeObject) {
list.removeObject(listObject);
} else {
list.addObject(listObject);
}
this.send('update', true);
this.send('closeModal');
this.get(listName).then(function(list) {
if (removeObject) {
list.removeObject(listObject);
} else {
list.addObject(listObject);
}
this.send('update', true);
this.send('closeModal');
}.bind(this));
},

actions: {
Expand Down

0 comments on commit b090c54

Please sign in to comment.