From 974d9bf199144641579af7eb4d7d9fdef1ddd0fa Mon Sep 17 00:00:00 2001 From: R Midhun Suresh Date: Fri, 6 Aug 2021 13:02:58 +0530 Subject: [PATCH] Don't cache powerlevel value Co-authored-by: Bruno Windels --- src/domain/session/rightpanel/MemberDetailsViewModel.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/domain/session/rightpanel/MemberDetailsViewModel.js b/src/domain/session/rightpanel/MemberDetailsViewModel.js index 55a448de..d7b4e366 100644 --- a/src/domain/session/rightpanel/MemberDetailsViewModel.js +++ b/src/domain/session/rightpanel/MemberDetailsViewModel.js @@ -76,11 +76,7 @@ export class MemberDetailsViewModel extends ViewModel { } get powerLevel() { - if (!this._powerLevel) { - const powerLevels = this._powerLevelsObservable.get(); - this._powerLevel = powerLevels.getUserLevel(this._member.userId); - } - return this._powerLevel; + return this._powerLevelsObservable.get()?.getUserLevel(this._member.userId); } get linkToUser() {