A platform for community discussion. Free, open, simple.
FIX: not loading more messages when username has a .
Sam9a4a7422f5d5
diff --git a/app/assets/javascripts/discourse/models/topic-list.js.es6 b/app/assets/javascripts/discourse/models/topic-list.js.es6index 61ee322a387..67293574042 100644--- a/app/assets/javascripts/discourse/models/topic-list.js.es6+++ b/app/assets/javascripts/discourse/models/topic-list.js.es6@@ -34,8 +34,22 @@ const TopicList = RestModel.extend({loadMore() {if (this.get('loadingMore')) { return Ember.RSVP.resolve(); }- const moreUrl = this.get('more_topics_url');+ let moreUrl = this.get('more_topics_url');if (moreUrl) {++ let [url, params] = moreUrl.split("?");++ // ensure we postfix with .json so username paths work+ // correctly+ if (!url.match(/\.json$/)) {+ url += '.json';+ }++ moreUrl = url;+ if (params) {+ moreUrl += "?" + params;+ }+const self = this;this.set('loadingMore', true);