Skip to content

Commit

Permalink
Migrate only non-empty layout sections to prevent creating empty tabs…
Browse files Browse the repository at this point in the history
… containers. (#1161)
  • Loading branch information
qooban authored Dec 29, 2020
1 parent 78d060e commit fc4746e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ module.exports = {
migrate(queryInterface, pageData => {
function migrateLayoutSection(layoutSection) {
if (pageData[layoutSection]) {
pageData.layout.push({ type: layoutSection, content: pageData[layoutSection] });
if (!_.isEmpty(pageData[layoutSection])) {
pageData.layout.push({ type: layoutSection, content: pageData[layoutSection] });
}
delete pageData[layoutSection];
}
}
Expand Down

0 comments on commit fc4746e

Please sign in to comment.