-
Notifications
You must be signed in to change notification settings - Fork 952
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
Display icons based on file types. #906
Conversation
8ceb1ad
to
21f0f67
Compare
find: find | ||
find: find, | ||
getPathIcon (path) { | ||
return path.endsWith('.txt') |
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.
that would be perhaps more readable with a switch
case
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.
A switch statement will not work so well for path.endsWith()
because the argument for switch will need to match a case, which we don't have in this case.
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.
Change set looks fine. It would be great if some tests can be added for this.
Fixes #198