mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 22:19:48 +03:00
Fix types
This commit is contained in:
parent
4b558ae15a
commit
93b7f71c8e
|
@ -104,11 +104,9 @@ export interface MonitorActionAction {
|
|||
export interface JumpToStateAction {
|
||||
type: 'JUMP_TO_STATE';
|
||||
index: number;
|
||||
actionId: number;
|
||||
}
|
||||
export interface JumpToActionAction {
|
||||
type: 'JUMP_TO_ACTION';
|
||||
index: number;
|
||||
actionId: number;
|
||||
}
|
||||
export interface PauseRecordingAction {
|
||||
|
|
|
@ -217,10 +217,8 @@ export function dispatchAction(
|
|||
if (action.type === 'JUMP_TO_STATE' || action.type === 'JUMP_TO_ACTION') {
|
||||
const id = state.selected || state.current;
|
||||
const liftedState = state.states[id];
|
||||
let currentStateIndex = action.index;
|
||||
if (typeof currentStateIndex === 'undefined' && action.actionId != null) {
|
||||
currentStateIndex = liftedState.stagedActionIds.indexOf(action.actionId);
|
||||
}
|
||||
const currentStateIndex =
|
||||
action.type === 'JUMP_TO_STATE' ? action.index : action.actionId;
|
||||
return {
|
||||
...state,
|
||||
states: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user