mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-28 20:43:56 +03:00
fix(extension): remove special case for JUMP_TO_STATE (#829)
This commit is contained in:
parent
cfba119c53
commit
855f22e14e
|
@ -2,10 +2,7 @@ import React, { Component } from 'react';
|
||||||
import { connect, ResolveThunks } from 'react-redux';
|
import { connect, ResolveThunks } from 'react-redux';
|
||||||
import { Button, Container, Divider, Toolbar } from 'devui';
|
import { Button, Container, Divider, Toolbar } from 'devui';
|
||||||
import SliderMonitor from '@redux-devtools/app/lib/containers/monitors/Slider';
|
import SliderMonitor from '@redux-devtools/app/lib/containers/monitors/Slider';
|
||||||
import {
|
import { liftedDispatch, getReport } from '@redux-devtools/app/lib/actions';
|
||||||
liftedDispatch as liftedDispatchAction,
|
|
||||||
getReport,
|
|
||||||
} from '@redux-devtools/app/lib/actions';
|
|
||||||
import { getActiveInstance } from '@redux-devtools/app/lib/reducers/instances';
|
import { getActiveInstance } from '@redux-devtools/app/lib/reducers/instances';
|
||||||
import DevTools from '@redux-devtools/app/lib/containers/DevTools';
|
import DevTools from '@redux-devtools/app/lib/containers/DevTools';
|
||||||
import Dispatcher from '@redux-devtools/app/lib/containers/monitors/Dispatcher';
|
import Dispatcher from '@redux-devtools/app/lib/containers/monitors/Dispatcher';
|
||||||
|
@ -161,7 +158,7 @@ const mapStateToProps = (state: StoreState) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const actionCreators = {
|
const actionCreators = {
|
||||||
liftedDispatch: liftedDispatchAction,
|
liftedDispatch,
|
||||||
getReport,
|
getReport,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -426,13 +426,6 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<unknown>>(
|
||||||
if (!features.lock && action.type === 'LOCK_CHANGES') return;
|
if (!features.lock && action.type === 'LOCK_CHANGES') return;
|
||||||
if (!features.pause && action.type === 'PAUSE_RECORDING') return;
|
if (!features.pause && action.type === 'PAUSE_RECORDING') return;
|
||||||
}
|
}
|
||||||
if (action.type === 'JUMP_TO_STATE') {
|
|
||||||
const liftedState = store.liftedStore.getState();
|
|
||||||
const index = liftedState.stagedActionIds.indexOf(action.actionId);
|
|
||||||
if (index === -1) return;
|
|
||||||
store.liftedStore.dispatch({ type: action.type, index });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
store.liftedStore.dispatch(action as any);
|
store.liftedStore.dispatch(action as any);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
||||||
import { connect, ResolveThunks } from 'react-redux';
|
import { connect, ResolveThunks } from 'react-redux';
|
||||||
import { Container } from 'devui';
|
import { Container } from 'devui';
|
||||||
import SliderMonitor from './monitors/Slider';
|
import SliderMonitor from './monitors/Slider';
|
||||||
import { liftedDispatch as liftedDispatchAction, getReport } from '../actions';
|
import { liftedDispatch, getReport } from '../actions';
|
||||||
import { getActiveInstance } from '../reducers/instances';
|
import { getActiveInstance } from '../reducers/instances';
|
||||||
import DevTools from '../containers/DevTools';
|
import DevTools from '../containers/DevTools';
|
||||||
import Dispatcher from './monitors/Dispatcher';
|
import Dispatcher from './monitors/Dispatcher';
|
||||||
|
@ -69,7 +69,7 @@ const mapStateToProps = (state: StoreState) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const actionCreators = {
|
const actionCreators = {
|
||||||
liftedDispatch: liftedDispatchAction,
|
liftedDispatch,
|
||||||
getReport,
|
getReport,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user