FIX: Open drafts for PMs from Activity > Drafts screen.
Draft.get sometimes returns only the sequence number.
This commit is contained in:
parent
39f7e98b60
commit
520d54d85f
|
@ -70,13 +70,16 @@ export default Ember.Component.extend(LoadMore, {
|
|||
} else {
|
||||
Draft.get(item.draft_key)
|
||||
.then(d => {
|
||||
if (d.draft) {
|
||||
composer.open({
|
||||
draft: d.draft,
|
||||
draftKey: item.draft_key,
|
||||
draftSequence: d.draft_sequence
|
||||
});
|
||||
const draft = d.draft || item.data;
|
||||
if (!draft) {
|
||||
return;
|
||||
}
|
||||
|
||||
composer.open({
|
||||
draft,
|
||||
draftKey: item.draft_key,
|
||||
draftSequence: d.draft_sequence
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
popupAjaxError(error);
|
||||
|
|
Loading…
Reference in New Issue