Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented May 11, 2025

…g on multiselect

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux requested review from ShGKme and artonge May 11, 2025 15:58
@susnux susnux added bug Something isn't working 3. to review labels May 11, 2025
@susnux
Copy link
Contributor Author

susnux commented May 11, 2025

/backport to stable6

@rotdrop
Copy link

rotdrop commented May 11, 2025

The changed line 101 contains a duplicated check for "multiselect". I suppose this is not intentional?

@susnux
Copy link
Contributor Author

susnux commented May 11, 2025

The changed line 101 contains a duplicated check for "multiselect". I suppose this is not intentional?

Not sure what you mean?

@rotdrop
Copy link

rotdrop commented May 11, 2025

The changed line 101 contains a duplicated check for "multiselect". I suppose this is not intentional?

Not sure what you mean?

Line 101 after applying your commit:

return nodes.map((node) => node.path) as (IsMultiSelect extends true ? string[] : string)

This is already in the code path where multiselect is true. Ok. I suppose this is still needed in order to persuade TypeScript to deduce the correct return type ...

@skjnldsv skjnldsv merged commit eba2e00 into main May 12, 2025
11 checks passed
@skjnldsv skjnldsv deleted the fix/filepicker-pick-return branch May 12, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pick() always will return an array even for multiselect === true even if the TypeScript typing is tuned to claim this different.

4 participants