1
0
Fork 0

Merge pull request #6095 from BenJamesBen/nailedit-seen-on-failure

fix(shared): Nailed it! seen on export failure
This commit is contained in:
Joost De Cock 2024-02-24 18:20:39 +01:00 committed by GitHub
commit be14ef95c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View file

@ -107,6 +107,7 @@ export const handleExport = async ({
t,
startLoading,
stopLoading,
stopLoadingFail,
onComplete,
onError,
ui,
@ -134,15 +135,16 @@ export const handleExport = async ({
}
// do additional business
onComplete && onComplete(e)
// stop the loader
if (typeof stopLoading === 'function') stopLoading()
}
// on error
else {
console.log(e.data.error)
onError && onError(e)
// stop the loader
if (typeof stopLoadingFail === 'function') stopLoadingFail()
}
// stop the loader
if (typeof stopLoading === 'function') stopLoading()
})
// pdf settings
@ -229,7 +231,6 @@ export const handleExport = async ({
}
} catch (err) {
console.log(err)
if (typeof stopLoading === 'function') stopLoading()
onError && onError(err)
}
}