mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
Fixed newsletter used from post in email preview
This commit is contained in:
parent
651f498f0b
commit
23c1939515
@ -55,10 +55,8 @@ export default class EmailPreviewModal extends Component {
|
||||
let {html, subject} = this;
|
||||
|
||||
// Fetch newsletter
|
||||
if (!this.newsletter && this.args.data.newsletterId) {
|
||||
const newsletters = (await this.store.query('newsletter', {filter: 'status:active+id:' + this.args.data.newsletterId, limit: 1})).toArray();
|
||||
const defaultNewsletter = newsletters[0];
|
||||
this.newsletter = defaultNewsletter;
|
||||
if (!this.newsletter && this.args.data.newsletter) {
|
||||
this.newsletter = this.args.data.newsletter;
|
||||
}
|
||||
|
||||
if (!this.newsletter) {
|
||||
|
Loading…
Reference in New Issue
Block a user