lisichatbot 2.1.8 → 2.1.9
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 +8 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -2104,7 +2104,11 @@ function handleOptionClick(element, field, isSingleSelect, options) {
|
|
|
2104
2104
|
// NAVIGATION
|
|
2105
2105
|
// =============================================================================
|
|
2106
2106
|
|
|
2107
|
+
let _handleNextRunning = false;
|
|
2107
2108
|
async function handleNext() {
|
|
2109
|
+
if (_handleNextRunning) return;
|
|
2110
|
+
_handleNextRunning = true;
|
|
2111
|
+
try {
|
|
2108
2112
|
const currentStep = flowData.flow[chatState.step];
|
|
2109
2113
|
|
|
2110
2114
|
const inputRequired = currentStep.inputRequired === true;
|
|
@@ -2798,9 +2802,12 @@ async function handleNext() {
|
|
|
2798
2802
|
}
|
|
2799
2803
|
|
|
2800
2804
|
await showNextStep();
|
|
2801
|
-
|
|
2805
|
+
|
|
2802
2806
|
// ✅ Final scroll after showNextStep completes
|
|
2803
2807
|
scrollToBottom();
|
|
2808
|
+
} finally {
|
|
2809
|
+
_handleNextRunning = false;
|
|
2810
|
+
}
|
|
2804
2811
|
}
|
|
2805
2812
|
|
|
2806
2813
|
// ✅ NEW: Helper function to find next step that is accessible in normal flow
|