mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
🐛 Fixed potential for partial content re-generation in 4.0 migrations (#13120)
no issue - incorrect syntax was used in the error handlers inside of the `for` loop, by using `return` when logging the whole for-loop was aborted whereas we want to log and continue processing the rest of the items
This commit is contained in:
parent
05b317af9d
commit
541fb4d2db
@ -30,10 +30,12 @@ module.exports = createIrreversibleMigration(async (knex) => {
|
||||
mobiledoc = JSON.parse(post.mobiledoc || null);
|
||||
|
||||
if (!mobiledoc) {
|
||||
return logging.warn(`No mobiledoc for ${id}. Skipping.`);
|
||||
logging.warn(`No mobiledoc for ${id}. Skipping.`);
|
||||
continue;
|
||||
}
|
||||
} catch (err) {
|
||||
return logging.warn(`Invalid JSON structure for ${id}. Skipping`);
|
||||
logging.warn(`Invalid JSON structure for ${id}. Skipping`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const html = mobiledocLib.mobiledocHtmlRenderer.render(mobiledoc);
|
||||
|
Loading…
Reference in New Issue
Block a user