-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(files): Fix type issues of mixing string and number #41952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5858325 to
46a8eff
Compare
| }, | ||
| computed: { | ||
| currentView(): View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the typing?
There was a problem hiding this comment.
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.
| window.OCA.Files.Sidebar.setActiveTab('sharing') | ||
| } | ||
| sidebarAction.exec(this.currentFolder, this.currentView, this.currentFolder.path) | ||
| if (this.currentFolder !== undefined) { |
There was a problem hiding this comment.
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 <[email protected]>
46a8eff to
050ce4d
Compare
|
Too much conflicts, closing 🙈 |
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