diff --git a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 index 1bc7638c83d..01b1c9216de 100644 --- a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 +++ b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 @@ -28,7 +28,6 @@ class PluginApi { constructor(version, container) { this.version = version; this.container = container; - this._currentUser = container.lookup('current-user:main'); this.h = h; } @@ -37,7 +36,7 @@ class PluginApi { * If the user is not logged in, it will be `null`. **/ getCurrentUser() { - return this._currentUser; + return this.container.lookup('current-user:main'); } /**