FIX: Performing actions on a particular reviewable was displaying an error

It was expecting a method to remove the reviewable from the current
list, only we were not displaying a list.

Instead, we refresh the reviewable model with the latest result.
This commit is contained in:
Robin Ward 2019-06-12 10:56:30 -04:00
parent c5dec04970
commit 13b979cb71
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,11 @@ export default Ember.Component.extend({
this.currentUser.set("reviewable_count", result.reviewable_count);
}
this.attrs.remove(performResult.remove_reviewable_ids);
if (this.attrs.remove) {
this.attrs.remove(performResult.remove_reviewable_ids);
} else {
return this.store.find("reviewable", reviewable.id);
}
})
.catch(popupAjaxError)
.finally(() => this.set("updating", false));