Skip to content
This repository was archived by the owner on Jun 11, 2021. It is now read-only.

Commit 9c330f5

Browse files
fix(docsearch): limit number of searches retrieved
1 parent 85f7f59 commit 9c330f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/docsearch-react/src/stored-searches.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function createStoredSearches<TItem extends StoredDocSearchHit>({
5151
limit = 5,
5252
}: CreateStoredSearchesOptions): StoredSearchPlugin<TItem> {
5353
const storage = createStorage<TItem>(key);
54-
let items = storage.getItem();
54+
let items = storage.getItem().slice(0, limit);
5555

5656
return {
5757
add(item: TItem) {

0 commit comments

Comments
 (0)