🐛 Fixed 1.25 migration for html field being null

no issue

- it can happen that the `html` field is null
- the migration script will fail and rollback the changes automatically
This commit is contained in:
kirrg001 2018-07-25 21:54:44 +02:00
parent fe367e4dbc
commit 569018c2bc
1 changed files with 1 additions and 1 deletions

View File

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