Fix empty screen list when deleting a table backing an autoscreen which is currently selected
This commit is contained in:
parent
e0d902d279
commit
248a1f456f
|
@ -85,7 +85,9 @@ export const getFrontendStore = () => {
|
|||
screens: {
|
||||
select: screenId => {
|
||||
store.update(state => {
|
||||
const screen = get(allScreens).find(screen => screen._id === screenId)
|
||||
let screens = get(allScreens)
|
||||
let screen =
|
||||
screens.find(screen => screen._id === screenId) || screens[0]
|
||||
if (!screen) return state
|
||||
state.currentFrontEndType = FrontendTypes.SCREEN
|
||||
state.currentAssetId = screen._id
|
||||
|
|
Loading…
Reference in New Issue