[inulax] history参数异常问题修复

This commit is contained in:
wangxinrong 2023-11-01 21:51:14 +08:00
parent 0636d8dab0
commit 628e09fe20
1 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ export function createHashHistory<S = DefaultStateType>(option: HashHistoryOptio
warning(state !== undefined, 'Hash history does not support state, it will be ignored');
const action = Action.push;
const location = createLocation<S>(history.location, to, undefined, '');
const location = createLocation<S>(history.location, to, state, '');
transitionManager.confirmJumpTo(location, action, getUserConfirmation, isJump => {
if (!isJump) {
@ -132,7 +132,7 @@ export function createHashHistory<S = DefaultStateType>(option: HashHistoryOptio
function replace(to: To, state?: S) {
warning(state !== undefined, 'Hash history does not support state, it will be ignored');
const action = Action.replace;
const location = createLocation<S>(history.location, to, undefined, '');
const location = createLocation<S>(history.location, to, state, '');
transitionManager.confirmJumpTo(location, action, getUserConfirmation, isJump => {
if (!isJump) {