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