FIX: match drafts using key when deleting

Using "sequence" when removing drafts was buggy, it would remove more than one draft from the stream sometimes.
This commit is contained in:
Penar Musaraj 2019-01-25 13:55:40 -05:00
parent 0e1862013a
commit 84a3da4b18
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export default RestModel.extend({
remove(draft) {
let content = this.get("content").filter(
item => item.sequence !== draft.sequence
item => item.draft_key !== draft.draft_key
);
this.setProperties({ content, itemsLoaded: content.length });
},