mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #6008 from overleaf/ae-clear-cache-file-list
[web] Clear the list of downloadable files after clearing the compile cache GitOrigin-RevId: d1d655612e6705f77c283b06012f8b5c14ed8f7a
This commit is contained in:
parent
cb6fc31225
commit
5126d756fe
1 changed files with 11 additions and 4 deletions
|
@ -380,10 +380,17 @@ export function CompileProvider({ children }) {
|
|||
const clearCache = useCallback(() => {
|
||||
setClearingCache(true)
|
||||
|
||||
return compiler.clearCache().finally(() => {
|
||||
return compiler
|
||||
.clearCache()
|
||||
.then(() => {
|
||||
setFileList(undefined)
|
||||
setPdfDownloadUrl(undefined)
|
||||
setPdfUrl(undefined)
|
||||
})
|
||||
.finally(() => {
|
||||
setClearingCache(false)
|
||||
})
|
||||
}, [compiler, setClearingCache])
|
||||
}, [compiler, setPdfDownloadUrl, setPdfUrl])
|
||||
|
||||
// clear the cache then run a compile, triggered by a menu item
|
||||
const recompileFromScratch = useCallback(() => {
|
||||
|
|
Loading…
Reference in a new issue