Skip to content

Commit 8b8c25b

Browse files
committed
Prefer history.replace in concepts search
1 parent 0580688 commit 8b8c25b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/services/search.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export const pushConceptsToHistory = function(history: History, searchText: stri
2323
"query": encodeURIComponent(searchText),
2424
"types": subjects.join(","),
2525
};
26-
history.push({
26+
27+
history.replace({ // concepts (phy-only) has no "apply filters" button to imply a single search; as such we prefer replace
2728
pathname: history.location.pathname,
2829
search: queryString.stringify(pickBy(queryOptions), {encode: false}),
2930
});

0 commit comments

Comments
 (0)