Skip to content

Commit 7278923

Browse files
committed
fix: safely check for search parameter in route query before deletion
1 parent eb9d0b3 commit 7278923

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/router/history/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class History {
8282
const local = currentRoute && path[0] === '#';
8383
const route = this.parse(replaceSlug(path));
8484

85-
if (route.query.s) {
85+
if (route?.query?.s) {
8686
delete route.query.s;
8787
}
8888

0 commit comments

Comments
 (0)