DYN-7082: Improvements to node List.IndexOf#15440
DYN-7082: Improvements to node List.IndexOf#15440QilongTang merged 6 commits intoDynamoDS:masterfrom
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7082
UI Smoke TestsTest: success. 11 passed, 0 failed. |
|
why does this return a string? |
|
Because we want to return null(and not -1) if the element is not found in the list. After this change, #15205, passing -1 as index would get the last element from the list. |
|
yeah I'm not getting it - |
|
Got it, my bad for misunderstanding. Changes should be fine now. |
|
@reddyashish Maybe add screenshot for behavior diff? |
|
Updated PR description |
Purpose
https://jira.autodesk.com/browse/DYN-7082
In reference to #15268, to avoid negative index values being returned, we modified IndexOf that will return null when the element is not found in the list.
Before:

After:

Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
DYN-7082: Improvements to node List.IndexOf
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.