🐛 Fixed 1.25 migration for mobiledoc field being null (#9752)

refs #9751

- the mobiledoc field can be null
- e.g. if you import a JSON with no markdown/mobiledoc or html field

The migration script for 1.25 had only the purpose to migrate existing Koenig Beta posts.
This commit is contained in:
Katharina Irrgang 2018-07-25 11:49:04 +02:00 committed by GitHub
parent 701c688474
commit 6a9fe1e10c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ module.exports.up = function regenerateKoenigBetaHTML(options) {
if (
post.get('html').match(/^<div class="kg-post">/)
|| !mobiledocIsCompatibleWithV1(mobiledoc)
|| (mobiledoc && !mobiledocIsCompatibleWithV1(mobiledoc))
) {
// change imagecard.payload.imageStyle to imagecard.payload.cardWidth
mobiledoc.cards.forEach((card) => {