1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Attempt to fix flakey 409s when deleting screens that are linked in the nav (#9700)

This commit is contained in:
Andrew Kingston 2023-02-16 13:33:53 +00:00 committed by GitHub
parent c5bc0d4ffb
commit c81ef6f128

View file

@ -312,7 +312,7 @@ export const getFrontendStore = () => {
const screensToDelete = Array.isArray(screens) ? screens : [screens]
// Build array of promises to speed up bulk deletions
const promises = []
let promises = []
let deleteUrls = []
screensToDelete.forEach(screen => {
// Delete the screen
@ -326,8 +326,8 @@ export const getFrontendStore = () => {
deleteUrls.push(screen.routing.route)
})
promises.push(store.actions.links.delete(deleteUrls))
await Promise.all(promises)
await store.actions.links.delete(deleteUrls)
const deletedIds = screensToDelete.map(screen => screen._id)
const routesResponse = await API.fetchAppRoutes()
store.update(state => {