Add comment to highlight difference between previewing in v1 and v2 editors (#5894)
A follow-up to https://github.com/thepracticaldev/dev.to/pull/5873.
This commit is contained in:
parent
79ff4cbd19
commit
b09a0c60f3
1 changed files with 4 additions and 0 deletions
|
|
@ -29,6 +29,10 @@ function titleArea(previewResponse, version, articleState) {
|
|||
});
|
||||
}
|
||||
|
||||
// The v2 editor stores its cover image in articleState.mainImage, while the v1 editor
|
||||
// stores it as previewRespose.cover_image. When previewing, we handle both by
|
||||
// defaulting to setting the cover image to the mainImage on the article (v2),
|
||||
// and only using the cover image from the previewResponse if it exists (v1).
|
||||
let coverImage = articleState.mainImage || '';
|
||||
if (articleState.previewShowing) {
|
||||
// In preview state, use the cover_image from previewResponse.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue