0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

🐛 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

View file

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