lisichatbot 2.2.1 → 2.2.2
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/package.json +1 -1
- package/src/index.js +12 -6
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -2728,17 +2728,23 @@ async function handleNext() {
|
|
|
2728
2728
|
}
|
|
2729
2729
|
|
|
2730
2730
|
// Next step doesn't depend on edited field or shouldn't be shown
|
|
2731
|
-
//
|
|
2732
|
-
|
|
2733
|
-
chatState.
|
|
2734
|
-
|
|
2731
|
+
// Jump back to the target step instead of continuing forward
|
|
2732
|
+
chatState.returnToStep = null;
|
|
2733
|
+
chatState.editPath = [];
|
|
2734
|
+
chatState.step = targetStep;
|
|
2735
|
+
|
|
2735
2736
|
const allRangeWrappers = document.querySelectorAll('[data-chat-element="range-wrapper"]');
|
|
2736
2737
|
allRangeWrappers.forEach(wrapper => {
|
|
2737
2738
|
wrapper.style.display = 'none';
|
|
2738
2739
|
});
|
|
2739
|
-
|
|
2740
|
+
|
|
2740
2741
|
updateEditIcons();
|
|
2741
|
-
|
|
2742
|
+
|
|
2743
|
+
if (chatState.step >= flowData.flow.length) {
|
|
2744
|
+
handleCompletion();
|
|
2745
|
+
} else {
|
|
2746
|
+
await showNextStep();
|
|
2747
|
+
}
|
|
2742
2748
|
return;
|
|
2743
2749
|
} else {
|
|
2744
2750
|
// Reached or passed target
|