FIX: Clicking on "view latest topics" in a forum with few topics was

broken.
This commit is contained in:
Robin Ward 2014-08-05 16:26:28 -04:00
parent d29822e4cb
commit 4366ae43d6
1 changed files with 9 additions and 0 deletions

View File

@ -210,6 +210,15 @@ Discourse.TopicList.reopenClass({
}
session.setProperties({topicList: null, topicListScrollPosition: null});
// Clean up any string parameters that might slip through
params = params || {};
Ember.keys(params).forEach(function(k) {
var val = params[k];
if (val === "undefined" || val === "null" || val === 'false') {
params[k] = undefined;
}
});
var findParams = {};
Discourse.SiteSettings.top_menu.split('|').forEach(function (i) {
if (i.indexOf(filter) === 0) {