[inulax] history参数异常问题修复
This commit is contained in:
parent
0636d8dab0
commit
628e09fe20
|
@ -107,7 +107,7 @@ export function createHashHistory<S = DefaultStateType>(option: HashHistoryOptio
|
||||||
warning(state !== undefined, 'Hash history does not support state, it will be ignored');
|
warning(state !== undefined, 'Hash history does not support state, it will be ignored');
|
||||||
|
|
||||||
const action = Action.push;
|
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 => {
|
transitionManager.confirmJumpTo(location, action, getUserConfirmation, isJump => {
|
||||||
if (!isJump) {
|
if (!isJump) {
|
||||||
|
@ -132,7 +132,7 @@ export function createHashHistory<S = DefaultStateType>(option: HashHistoryOptio
|
||||||
function replace(to: To, state?: S) {
|
function replace(to: To, state?: S) {
|
||||||
warning(state !== undefined, 'Hash history does not support state, it will be ignored');
|
warning(state !== undefined, 'Hash history does not support state, it will be ignored');
|
||||||
const action = Action.replace;
|
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 => {
|
transitionManager.confirmJumpTo(location, action, getUserConfirmation, isJump => {
|
||||||
if (!isJump) {
|
if (!isJump) {
|
||||||
|
|
Loading…
Reference in New Issue