Skip to content

Commit fc5e21f

Browse files
AmirMohammad CheraghaliAmirMohammad Cheraghali
authored andcommitted
fix: Robust sidebar expansion using step selectors
1 parent 4de80c9 commit fc5e21f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/components/TourGuide.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ export const startOnboardingTour = (onComplete?: () => void, onHighlight?: (elem
6262
if (onComplete) onComplete();
6363
}
6464
},
65-
onHighlightStarted: (element) => {
66-
if (onHighlight && element) {
67-
const id = element.id ? `#${element.id}` : '';
68-
if (id) onHighlight(id);
65+
onHighlightStarted: (_element, step) => {
66+
if (onHighlight && step && typeof step.element === 'string') {
67+
onHighlight(step.element);
6968
}
7069
}
7170
});

0 commit comments

Comments
 (0)