mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:12:46 +08:00
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:
parent
0e1862013a
commit
84a3da4b18
|
@ -45,7 +45,7 @@ export default RestModel.extend({
|
||||||
|
|
||||||
remove(draft) {
|
remove(draft) {
|
||||||
let content = this.get("content").filter(
|
let content = this.get("content").filter(
|
||||||
item => item.sequence !== draft.sequence
|
item => item.draft_key !== draft.draft_key
|
||||||
);
|
);
|
||||||
this.setProperties({ content, itemsLoaded: content.length });
|
this.setProperties({ content, itemsLoaded: content.length });
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user