set slider to -1 so we don't switch to 0 before the internalcalltree is ready

pull/3209/head
yann300 2 years ago
parent 479df5314b
commit b732af0a40
  1. 1
      libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx
  2. 2
      libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx

@ -9,6 +9,7 @@ export const Slider = ({ jumpTo, sliderValue, traceLength }) => {
}, [sliderValue]) }, [sliderValue])
const setValue = (value) => { const setValue = (value) => {
if (value < 0) return
if (value === slider.current.value) return if (value === slider.current.value) return
slider.current.value = value slider.current.value = value
if (onChangeId.current) { if (onChangeId.current) {

@ -4,7 +4,7 @@ import ButtonNavigator from '../button-navigator/button-navigator' // eslint-dis
export const StepManager = ({ stepManager: { jumpTo, traceLength, stepIntoBack, stepIntoForward, stepOverBack, stepOverForward, jumpOut, jumpNextBreakpoint, jumpPreviousBreakpoint, jumpToException, registerEvent } }) => { export const StepManager = ({ stepManager: { jumpTo, traceLength, stepIntoBack, stepIntoForward, stepOverBack, stepOverForward, jumpOut, jumpNextBreakpoint, jumpPreviousBreakpoint, jumpToException, registerEvent } }) => {
const [state, setState] = useState({ const [state, setState] = useState({
sliderValue: 0, sliderValue: -1,
revertWarning: '', revertWarning: '',
stepState: '', stepState: '',
jumpOutDisabled: true jumpOutDisabled: true

Loading…
Cancel
Save