diff --git a/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts b/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts index ecc9483c..1b7d0cd3 100644 --- a/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts +++ b/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts @@ -212,6 +212,9 @@ export class UniTrendParentComponent implements OnInit { getMappedTopic(topicOrKeyword: string): string { if (!topicOrKeyword) return ''; + if (!this.isFuzzy()) { + return topicOrKeyword; + } const cleanId = cleanEntityId(topicOrKeyword); const isTopicId = @@ -1040,7 +1043,7 @@ export class UniTrendParentComponent implements OnInit { updateUrlParams() { const queryParams: any = { search_type: this.selectedSearchType(), - trend_topics: this.selectedTrendTopics(), + trend_topics: this.isFuzzy() ? this.selectedTrendTopics() : null, institutions: this.comparisonInstitutions().length > 0 ? this.comparisonInstitutions().map( diff --git a/webapp/src/app/resolvers/uni-trend.resolver.ts b/webapp/src/app/resolvers/uni-trend.resolver.ts index 82e87e07..e94170da 100644 --- a/webapp/src/app/resolvers/uni-trend.resolver.ts +++ b/webapp/src/app/resolvers/uni-trend.resolver.ts @@ -66,10 +66,10 @@ export const uniTrendResolver: ResolveFn = ( keywords = searchState.keywords(); } - let topics = [ - ...params.getAll('trend_topics'), - ...params.getAll('trend_topic'), - ]; + let topics = fuzzy + ? [...params.getAll('trend_topics'), ...params.getAll('trend_topic')] + : []; + if (topics.length === 0) { const rawTopicsList = [ ...params.getAll('topic'), @@ -97,6 +97,7 @@ export const uniTrendResolver: ResolveFn = ( ? searchState.topicsList() : searchState.keywords(); if ( + !fuzzy || topics.length === 0 || (fuzzy && stateTopics.length > 0 &&