Fixes profile view not reloading on new username.

This commit is contained in:
Dominik Picheta 2018-05-15 16:30:08 +01:00
commit 9ce1ad94c7

View file

@ -59,7 +59,7 @@ when defined(js):
if state.status != Http200:
return renderError("Couldn't retrieve profile.")
if state.profile.isNone:
if state.profile.isNone or state.profile.get().user.name != username:
let uri = makeUri("profile.json", ("username", username))
ajaxGet(uri, @[], (s: int, r: kstring) => onProfile(s, r, state))