fix(lib/storage): only call get after delete if already loaded

This commit is contained in:
PalmDevs 2025-10-23 17:04:14 +07:00
parent 0f0c5f85eb
commit 0f7218aa1a
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -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
}