Skip to content

Commit

Permalink
fix: search examples params patch
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Dec 11, 2024
1 parent b4a6672 commit bd2aaaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/components/search-examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default angular.module("korpApp").component("searchExamples", {
if (params.cqp) {
statemachine.send("SEARCH_CQP", { cqp: params.cqp } as CqpSearchEvent)
}
$location.search(params)
// Do not use `$location.search(params)` because it will remove existing params (like `corpus`)
Object.keys(params).forEach((key: keyof HashParams) => $location.search(key, params[key]))
}
},
],
Expand Down

0 comments on commit bd2aaaf

Please sign in to comment.