Skip to content

fix(runner): handle negative iteration index in getIterationData#1539

Open
Aggarwalmansi wants to merge 1 commit intopostmanlabs:developfrom
Aggarwalmansi:fix-negative-iteration-data
Open

fix(runner): handle negative iteration index in getIterationData#1539
Aggarwalmansi wants to merge 1 commit intopostmanlabs:developfrom
Aggarwalmansi:fix-negative-iteration-data

Conversation

@Aggarwalmansi
Copy link
Copy Markdown

Summary

This PR adds defensive handling for negative iteration indices in getIterationData.

Previously, passing a negative iteration value would return undefined due to array indexing behavior. The function now safely falls back to returning the first data element.

Changes

  • Updated getIterationData to handle negative iteration values
  • Added unit test coverage for negative iteration scenarios

Tests

  • Unit tests added and verified for getIterationData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant