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{
|
}else{
|
||||||
setTransient('lastSearch', { searchKey, model }, 5);
|
setTransient('lastSearch', { searchKey, model }, 5);
|
||||||
|
model.grouped_search_result = results.grouped_search_result;
|
||||||
this.set("model", model);
|
this.set("model", model);
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
|
|
@ -36,7 +36,8 @@ export default Discourse.Route.extend({
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}).then(results => {
|
}).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);
|
setTransient('lastSearch', { searchKey, model }, 5);
|
||||||
return model;
|
return model;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue