Skip to content

fix(files): Fix type issues of mixing string and number - #41952

Closed
susnux wants to merge 1 commit into
masterfrom
fix/files-typescript-issues
Closed

fix(files): Fix type issues of mixing string and number#41952
susnux wants to merge 1 commit into
masterfrom
fix/files-typescript-issues

Conversation

@susnux

Copy link
Copy Markdown
Contributor

Summary

Fix some type issues in the files list where numbers were mixed with strings for fileids and thus the strict compare will fail (===).

Checklist

@susnux
susnuxforce-pushed the fix/files-typescript-issues branch 3 times, most recently from 5858325 to 46a8effCompareDecember 1, 2023 16:57
},

computed: {
currentView(): View {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the typing?

@susnuxsusnuxDec 13, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it was wrong, the correct type would be View | null as this is the type of Navigation.active .
So the correct typing is inferred.

Comment threadapps/files/src/components/FileEntry/FileEntryCheckbox.vue
Comment threadapps/files/src/components/FilesListTableHeaderActions.vue
Comment threadapps/files/src/components/FileEntry.vue Outdated
window.OCA.Files.Sidebar.setActiveTab('sharing')
}
sidebarAction.exec(this.currentFolder, this.currentView, this.currentFolder.path)
if (this.currentFolder !== undefined) {

@skjnldsvskjnldsvDec 6, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there is a lot of unrelated changes?
How would this.currentFolder be undefined?
The FilesList gets rendered only if we have files, which we have only if this.currentFolder is defined, no? 🤔

EDIT: saw the above changes! 👍

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnuxforce-pushed the fix/files-typescript-issues branch from 46a8eff to 050ce4dCompareDecember 13, 2023 15:52
@susnux
susnux requested a review from skjnldsvDecember 13, 2023 15:54
@susnuxsusnux added this to the Nextcloud 29 milestone Jan 20, 2024
This was referenced Mar 12, 2024
@skjnldsv

Copy link
Copy Markdown
Member

Too much conflicts, closing 🙈

@skjnldsvskjnldsv removed this from the Nextcloud 29 milestone Mar 15, 2024
@skjnldsv
skjnldsv deleted the fix/files-typescript-issues branch March 15, 2024 12:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@susnux@skjnldsv@artonge