diff --git a/app/scripts/components/search-examples.ts b/app/scripts/components/search-examples.ts index 79824388..4facfabe 100644 --- a/app/scripts/components/search-examples.ts +++ b/app/scripts/components/search-examples.ts @@ -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])) } }, ],