mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Fixed error when opening meta/facebook/twitter settings with a new post
no issue - `post.scratch` does not exist until post contents have been edited which meant that the `seoDescription` CP was erroring trying to access a non-existent `cards` property
This commit is contained in:
parent
612cbc034f
commit
c28d024fec
@ -52,7 +52,7 @@ export default Component.extend(SettingsMenuMixin, {
|
||||
seoDescription: computed('post.scratch', 'metaDescriptionScratch', function () {
|
||||
let metaDescription = this.metaDescriptionScratch || '';
|
||||
let mobiledoc = this.get('post.scratch');
|
||||
let [markdownCard] = mobiledoc.cards;
|
||||
let [markdownCard] = (mobiledoc && mobiledoc.cards) || [];
|
||||
let markdown = markdownCard && markdownCard[1] && markdownCard[1].markdown;
|
||||
let placeholder;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user