Skip to content

Commit 1b5e40b

Browse files
committed
Log in to the main page without saving history
1 parent 9c2ffeb commit 1b5e40b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

chat2db-client/src/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ export function formatSql(sql: string, dbType: DatabaseTypeCode) {
244244
// 桌面端用hash模式,web端用history模式,路由跳转
245245
export function navigate(path: string) {
246246
if (__ENV__ === 'desktop') {
247-
window.location.href = `#${path}`;
247+
window.location.replace(`#${path}`)
248248
} else {
249-
window.location.href = path;
249+
window.location.replace(path)
250250
}
251251
}
252252

0 commit comments

Comments
 (0)