bugfix: create new screen exception

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

View File

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