From dc4a7d98e835d9d44564c6681eb3b7284a65987f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 2 Dec 2020 14:45:19 +0100 Subject: [PATCH] web: fix SidebarUser not rendering --- web/src/elements/sidebar/SidebarUser.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/elements/sidebar/SidebarUser.ts b/web/src/elements/sidebar/SidebarUser.ts index 487c675f6..983b5f23b 100644 --- a/web/src/elements/sidebar/SidebarUser.ts +++ b/web/src/elements/sidebar/SidebarUser.ts @@ -6,6 +6,7 @@ import fa from "@fortawesome/fontawesome-free/css/all.css"; // @ts-ignore import AvatarStyle from "@patternfly/patternfly/components/Avatar/avatar.css"; import { User } from "../../api/user"; +import { until } from "lit-html/directives/until"; @customElement("pb-sidebar-user") export class SidebarUser extends LitElement { @@ -41,12 +42,13 @@ export class SidebarUser extends LitElement { ]; } - async render(): Promise { - const user = await User.me(); + render(): TemplateResult { return html` - - ${user.username} + ${until(User.me().then(u => { + return html` + ${u.username}`; + }), html``)}