fix(FilePickerBuilder): correctly return array / plain value depending on multiselect by susnux · Pull Request #1775 · nextcloud-libraries/nextcloud-dialogs
Navigation Menu
{{ message }}
nextcloud-libraries / nextcloud-dialogs Public
- Notifications You must be signed in to change notification settings
- Fork 5
Merged
fix(FilePickerBuilder): correctly return array / plain value depending on multiselect#1775
fix(FilePickerBuilder): correctly return array / plain value depending on multiselect#1775
Conversation
Copy link Copy Markdown
Contributor
susnux
commented
May 11, 2025
susnux
commented
…g on multiselect Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
susnux
requested review from
ShGKme and
artonge
Copy link Copy Markdown
Contributor Author
susnux
commented
May 11, 2025
susnux commented
May 11, 2025/backport to stable6
backportbot
bot
added
the
backport-request
label
Copy link Copy Markdown
rotdrop
commented
May 11, 2025
rotdrop commented
May 11, 2025The changed line 101 contains a duplicated check for "multiselect". I suppose this is not intentional?
Copy link Copy Markdown
Contributor Author
susnux
commented
May 11, 2025
susnux commented
May 11, 2025The changed line 101 contains a duplicated check for "multiselect". I suppose this is not intentional?
Not sure what you mean?
Copy link Copy Markdown
rotdrop
commented
May 11, 2025
rotdrop commented
May 11, 2025The 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 approved these changes May 12, 2025
skjnldsv
deleted the
fix/filepicker-pick-return
branch
backportbot
bot
mentioned this pull request
backportbot
bot
removed
the
backport-request
label
susnux
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment