From 93b7f71c8e6709f082ab7d5a5ddfcc64ae39facb Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Thu, 6 Jan 2022 21:48:09 -0500 Subject: [PATCH] Fix types --- packages/redux-devtools-app/src/actions/index.ts | 2 -- packages/redux-devtools-app/src/reducers/instances.ts | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/redux-devtools-app/src/actions/index.ts b/packages/redux-devtools-app/src/actions/index.ts index 9611a447..fd6128d6 100644 --- a/packages/redux-devtools-app/src/actions/index.ts +++ b/packages/redux-devtools-app/src/actions/index.ts @@ -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 { diff --git a/packages/redux-devtools-app/src/reducers/instances.ts b/packages/redux-devtools-app/src/reducers/instances.ts index bd3ff32c..017e37cf 100644 --- a/packages/redux-devtools-app/src/reducers/instances.ts +++ b/packages/redux-devtools-app/src/reducers/instances.ts @@ -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: {