bugfix: create new screen exception

This commit is contained in:
Michael Shanks 2020-02-25 10:01:26 +00:00
parent b28f28a167
commit 3a98e23ffb
1 changed files with 9 additions and 4 deletions

View File

@ -473,9 +473,12 @@ const _saveScreen = async (store, s, screen) => {
),
updatedScreen,
]
s.pages[s.currentPageName]._screens = screens
s.screens = screens
_savePage(s)
store.update(innerState => {
innerState.pages[s.currentPageName]._screens = screens
innerState.screens = screens
_savePage(innerState)
return innerState
})
})
return s
@ -502,7 +505,9 @@ const createScreen = store => (screenName, route, layoutComponentName) => {
s.currentComponentInfo = newScreen.props
s.currentFrontEndType = "screen"
return _saveScreen(store, s, newScreen)
_saveScreen(store, s, newScreen)
return s
})
}