I don't have time to work on an update, but clearly PR 50 / version 1.3.1 broke the AcceptPoliciesModal
with the new dynamic user data load.
While looking at the code in PR 50 I also noticed a few things. this.user = user
is redundant, as Flarum always updates the objects in the store by reference. It's safe to continue to use this.attrs.user
everywhere. Other thing, parent.oninit(); this.loading = true
is a bit dangerous, if the parent method somehow triggers a redraw, or if a very bad timing causes another async code to redraw while this method has not finished running, then view
will be called and try to access the data that's not loaded yet. Would be safer to set loading
to true
by default, and set it to false
in oninit
@IanM