fix(lib/storage): only call get after delete if already loaded
This commit is contained in:
parent
0f0c5f85eb
commit
0f7218aa1a
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ export function Storage<T extends AnyObject>(
|
|||
this.delete = async function () {
|
||||
await FileModule.removeFile(directory, path)
|
||||
const success = !(await this.exists())
|
||||
if (success) await this.get()
|
||||
if (this.loaded && success) await this.get()
|
||||
return success
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue