This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/routes/user-index.js.es6
2016-02-18 12:19:00 -05:00

15 lines
461 B
JavaScript

export default Discourse.Route.extend({
beforeModel: function() {
// HACK: Something with the way the user card intercepts clicks seems to break how the
// transition into a user's activity works. This makes the back button work on mobile
// where there is no user card as well as desktop where there is.
if (this.site.mobileView) {
this.replaceWith('userActivity');
} else {
this.transitionTo('userActivity');
}
}
});