diff options
Diffstat (limited to 'src/state/models/me.ts')
-rw-r--r-- | src/state/models/me.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/state/models/me.ts b/src/state/models/me.ts index 17a372381..0a3627217 100644 --- a/src/state/models/me.ts +++ b/src/state/models/me.ts @@ -11,6 +11,13 @@ export class MeModel { makeAutoObservable(this, {rootStore: false}, {autoBind: true}) } + clear() { + this.did = undefined + this.name = undefined + this.displayName = undefined + this.description = undefined + } + async load() { const sess = this.rootStore.session if (sess.isAuthed && sess.data) { @@ -29,10 +36,7 @@ export class MeModel { } }) } else { - this.did = undefined - this.name = undefined - this.displayName = undefined - this.description = undefined + this.clear() } } } |