@heycater/qualification-funnel 1.19.3 → 1.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -8009,6 +8009,7 @@ function setQuestion(state, stepId) {
8009
8009
  return state;
8010
8010
  }
8011
8011
  function toNextStep(state, onFunnelFinished) {
8012
+ var _a2;
8012
8013
  if (state.status !== QUALIFICATION_STATUS.answering) {
8013
8014
  return state;
8014
8015
  }
@@ -8019,8 +8020,12 @@ function toNextStep(state, onFunnelFinished) {
8019
8020
  const stepIndex = state.qualification.steps.findIndex(
8020
8021
  (_step) => _step.id === step2.id
8021
8022
  );
8022
- const nextStep = state.qualification.steps[stepIndex + 1];
8023
- if (!nextStep || (nextStep == null ? void 0 : nextStep.disabled)) {
8023
+ let nextStepIndex = stepIndex + 1;
8024
+ while (nextStepIndex < state.qualification.steps.length && ((_a2 = state.qualification.steps[nextStepIndex]) == null ? void 0 : _a2.disabled)) {
8025
+ nextStepIndex++;
8026
+ }
8027
+ const nextStep = state.qualification.steps[nextStepIndex];
8028
+ if (!nextStep) {
8024
8029
  const funnelAnsweredState = {
8025
8030
  ...state,
8026
8031
  status: "answered",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycater/qualification-funnel",
3
- "version": "1.19.3",
3
+ "version": "1.19.4",
4
4
  "type": "module",
5
5
  "description": "Heycater embedded qualification funnel widget",
6
6
  "main": "dist/index.cjs.js",