Skip to content

Commit 15e6318

Browse files
committed
Fixes search result links for ember-data
1 parent 7eb7967 commit 15e6318

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/components/search-input/dropdown-result.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ export default Component.extend({
99
groupName: '',
1010
groupPosition: 0, // Index of this result in the grouped results
1111

12+
module: computed('result.{project,module}', function () {
13+
if (this.get('result.project')) {
14+
return this.get('result.project');
15+
}
16+
return this.get('result.module') === 'ember-data' ? 'ember-data' : 'ember'
17+
}),
1218
// Private API
1319
classNames: ['ds-suggestion'],
1420
attributeBindings: ['role'],

app/templates/components/search-input/dropdown-result.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="algolia-docsearch-suggestion--content">
88
{{#if result.static}}
99
{{#link-to "project-version.functions.function"
10-
(or result.project "ember")
10+
module
1111
version
1212
result.class
1313
result.name
@@ -34,7 +34,7 @@
3434
{{/link-to}}
3535
{{else}}
3636
{{#link-to "project-version.classes.class.methods.method"
37-
(or result.project "ember")
37+
module
3838
version
3939
result.class
4040
result.name

0 commit comments

Comments
 (0)