How to use browser.goto without getting stuck in loop?

I am building a signup flow that goes like this.

  1. Signup
  2. Confirm email
  3. Send to “get-started” page until all fields are completed.

In my header I have the below code, but the else statement is causing a loop on the home page when the activation_step > 3. Is there a way to make this an IF statement (i.e. if on homepage and activation step >3, then do nothing.)?

<dmx-serverconnect id="userDetails" url="dmxConnect/api/Security/userDetails.php" dmx-on:success="browser1.goto(userDetails.data.getUserDetails[0].activation_step<3 ? 'get-started?step=1' : '')"></dmx-serverconnect>

Community Page
Last updated: