@@ -110,13 +110,13 @@ const stopTour = (): void => {
110110 tooltip .value ?.setAttribute (' data-hidden' , ' ' );
111111};
112112
113- const resetTour = (restart = false ): void => {
113+ const resetTour = (shouldRestart = false ): void => {
114114 stopTour ();
115115 currentStepIndex .value = 0 ;
116116 lastStepIndex .value = 0 ;
117117 nextStepIndex .value = 1 ;
118118 localStorage .removeItem (saveKey .value );
119- if (restart ) startTour ();
119+ if (shouldRestart ) startTour ();
120120};
121121
122122const nextStep = async (): Promise <void > => {
@@ -155,16 +155,16 @@ const endTour = (): void => {
155155 emit (' onTourEnd' );
156156};
157157
158- const goToStep = async (step : number ): Promise <void > => {
159- if (step < 0 || step >= props .steps .length ) {
160- console .warn (` Invalid step index: ${step } ` );
158+ const goToStep = async (stepIndex : number ): Promise <void > => {
159+ if (stepIndex < 0 || stepIndex >= props .steps .length ) {
160+ console .warn (` Invalid step index: ${stepIndex } ` );
161161 return ;
162162 }
163163
164- await beforeStep (step );
165- currentStepIndex .value = step ;
166- lastStepIndex .value = Math .max (step - 1 , 0 );
167- nextStepIndex .value = step + 1 ;
164+ await beforeStep (stepIndex );
165+ currentStepIndex .value = stepIndex ;
166+ lastStepIndex .value = Math .max (stepIndex - 1 , 0 );
167+ nextStepIndex .value = stepIndex + 1 ;
168168 await updatePosition ();
169169};
170170
0 commit comments