From 593f3d92312ba6b975acdf3c8494dfebe9b9d9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?syuilo=E2=AD=90=EF=B8=8F?= <Syuilotan@yahoo.co.jp> Date: Tue, 21 Feb 2017 21:51:58 +0900 Subject: [PATCH] Update user.tag --- src/web/app/desktop/tags/user.tag | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/web/app/desktop/tags/user.tag b/src/web/app/desktop/tags/user.tag index 9b64cf08e..c12873618 100644 --- a/src/web/app/desktop/tags/user.tag +++ b/src/web/app/desktop/tags/user.tag @@ -34,18 +34,21 @@ <script> this.mixin('api'); - this.username = this.opts.user - this.page = if this.opts.page? then this.opts.page else 'home' - this.fetching = true - this.user = null + this.username = this.opts.user; + this.page = this.opts.page ? this.opts.page : 'home'; + this.fetching = true; + this.user = null; this.on('mount', () => { this.api('users/show', { username: this.username - }).then((user) => { - this.fetching = false - this.user = user - this.update(); + }).then(user => { + this.update({ + fetching: false, + user: user + }); this.trigger('loaded'); + }); + }); </script> </mk-user>