introduction selectable

This commit is contained in:
Jon Eugster
2023-07-16 23:09:32 +02:00
parent 7568f1dd4a
commit f36695ad5c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -329,7 +329,7 @@ export function CommandLineInterface(props: {world: string, level: number, data:
// Scroll to element if selection changes
React.useEffect(() => {
if (selectedStep) {
if (typeof selectedStep !== 'undefined') {
Array.from(proofPanelRef.current?.getElementsByClassName(`step-${selectedStep}`)).map((elem) => {
elem.scrollIntoView({block: "center"})
})