Always try to migrate navigation settings when importing apps
This commit is contained in:
parent
7682d056c0
commit
f056807f79
|
@ -304,7 +304,7 @@ const performAppCreate = async (ctx: any) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// Migrate navigation settings and screens if required
|
// Migrate navigation settings and screens if required
|
||||||
if (existing && !existing.navigation) {
|
if (existing) {
|
||||||
const navigation = await migrateAppNavigation()
|
const navigation = await migrateAppNavigation()
|
||||||
if (navigation) {
|
if (navigation) {
|
||||||
newApplication.navigation = navigation
|
newApplication.navigation = navigation
|
||||||
|
@ -601,7 +601,7 @@ const migrateAppNavigation = async () => {
|
||||||
// Migrate all screens, removing custom layouts
|
// Migrate all screens, removing custom layouts
|
||||||
for (let screen of screens) {
|
for (let screen of screens) {
|
||||||
if (!screen.layoutId) {
|
if (!screen.layoutId) {
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
const layout = layouts.find(layout => layout._id === screen.layoutId)
|
const layout = layouts.find(layout => layout._id === screen.layoutId)
|
||||||
screen.layoutId = undefined
|
screen.layoutId = undefined
|
||||||
|
@ -615,7 +615,7 @@ const migrateAppNavigation = async () => {
|
||||||
const layout = layouts?.find(
|
const layout = layouts?.find(
|
||||||
(layout: Layout) => layout._id === BASE_LAYOUT_PROP_IDS.PRIVATE
|
(layout: Layout) => layout._id === BASE_LAYOUT_PROP_IDS.PRIVATE
|
||||||
)
|
)
|
||||||
if (layout) {
|
if (layout && !existing.navigation) {
|
||||||
let navigationSettings: any = {
|
let navigationSettings: any = {
|
||||||
navigation: "Top",
|
navigation: "Top",
|
||||||
title: name,
|
title: name,
|
||||||
|
|
Loading…
Reference in New Issue