mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-09 07:07:50 +02:00
fix: check if cache exists before removing it
This commit is contained in:
+3
-1
@@ -295,7 +295,9 @@ export default class Repository {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async removeCache() {
|
async removeCache() {
|
||||||
return storage.rm(this._model.repoId + "/");
|
if (await storage.exists(this._model.repoId + "/")) {
|
||||||
|
return storage.rm(this._model.repoId + "/");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user