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 9d43b534e5
commit 71aa70e9d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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 => {