fix: Simplify loop stopping condition to prevent off-by-one errors (#6696)
* 🐛 (loop.py): Fix logic in LoopComponent to correctly evaluate if loop should stop based on current index and data length 📝 (LoopTemplate.json): Update output_types to be arrays for consistency and readability in LoopTemplate JSON file * 🐛 (loop.py): fix logic in stop condition to correctly evaluate if loop should stop or continue based on current index and data length * [autofix.ci] apply automated fixes * ✅ (loop-component.spec.ts): update test expectation to match the correct number of occurrences of "modified_value" in the output --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
114c25ecae
commit
af2d77d886
3 changed files with 3 additions and 3 deletions
|
|
@ -237,6 +237,6 @@ test(
|
|||
|
||||
// Count occurrences of modified_value in output
|
||||
const matches = output?.match(/modified_value/g) || [];
|
||||
expect(matches).toHaveLength(2);
|
||||
expect(matches).toHaveLength(1);
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue