From 7422a3a262ea98713b5236cc87f977faf304b6e8 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Wed, 22 Feb 2023 09:41:28 +0100 Subject: [PATCH] fix: save model after the state reset --- src/Repository.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Repository.ts b/src/Repository.ts index 58bd244..4825fc7 100644 --- a/src/Repository.ts +++ b/src/Repository.ts @@ -280,12 +280,12 @@ export default class Repository { * Reset/delete the state of the repository */ async resetSate(status?: RepositoryStatus, statusMessage?: string) { - if (status) { - await this.updateStatus(status, statusMessage); - } // remove attribute this._model.size = { storage: 0, file: 0 }; this._model.originalFiles = undefined; + if (status) { + await this.updateStatus(status, statusMessage); + } // remove cache await this.removeCache(); }