FIX: show create new topic link when there are no search results
This commit is contained in:
parent
114294d899
commit
8ad6d8385b
|
@ -231,6 +231,7 @@ export default Ember.Controller.extend({
|
|||
}
|
||||
}else{
|
||||
setTransient('lastSearch', { searchKey, model }, 5);
|
||||
model.grouped_search_result = results.grouped_search_result;
|
||||
this.set("model", model);
|
||||
}
|
||||
}).finally(() => {
|
||||
|
|
|
@ -36,7 +36,8 @@ export default Discourse.Route.extend({
|
|||
return null;
|
||||
}
|
||||
}).then(results => {
|
||||
const model = (results && translateResults(results)) || {};
|
||||
const grouped_search_result = results ? results.grouped_search_result : {};
|
||||
const model = (results && translateResults(results)) || { grouped_search_result };
|
||||
setTransient('lastSearch', { searchKey, model }, 5);
|
||||
return model;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue