From b732af0a409a8d8d1d4ef5163dec1e1b984120de Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 13 Dec 2022 11:05:58 +0100 Subject: [PATCH] set slider to -1 so we don't switch to 0 before the internalcalltree is ready --- libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx | 1 + libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx b/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx index 2d4c374770..b49a104456 100644 --- a/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx @@ -9,6 +9,7 @@ export const Slider = ({ jumpTo, sliderValue, traceLength }) => { }, [sliderValue]) const setValue = (value) => { + if (value < 0) return if (value === slider.current.value) return slider.current.value = value if (onChangeId.current) { diff --git a/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx b/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx index 4094184310..cba5f18926 100644 --- a/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx @@ -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 } }) => { const [state, setState] = useState({ - sliderValue: 0, + sliderValue: -1, revertWarning: '', stepState: '', jumpOutDisabled: true