Skip to content

Commit e1a2860

Browse files
authored
add shallow true to search to avoid triggering page data requests (#25184)
1 parent 8d460fe commit e1a2860

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

components/Search.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ export function Search({
132132
if (router.pathname === '/') {
133133
// Don't include router.locale so next doesn't attempt a
134134
// request to `/_next/static/chunks/pages/en.js`
135-
router.replace(`/?${params.toString()}`, asPath)
135+
router.replace(`/?${params.toString()}`, asPath, { shallow: true })
136136
} else {
137-
router.replace(asPath)
137+
router.replace(asPath, undefined, { shallow: true })
138138
}
139139
}
140140
}, [debouncedQuery])

0 commit comments

Comments
 (0)