-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix drag and drop example #357
Conversation
index.bs
Outdated
} | ||
const fileHandlesPromises = [...e.dataTransfer.items] | ||
.filter((item) => item.kind === 'file') | ||
.map((item) => item.getAsFileSystemHandle()); |
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.
you don't need () around item when there is just one argument. .map(item => item.getAsFileSystemHandle());
works fine
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.
It's a style guide thing. Google highly recommends adding braces.
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.
I see. I usually leave them out as they just add more noise and make the code less readable in my opinion :-)
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.
This is the spec, the Google Style Guide doesn't apply here. Feel free to remove, I don't have hard feelings. It's a prettier rule that I have in muscle memory :-)
* Fix drag and drop example Fixes #356 * Update index.bs SHA: 2ccefeb Reason: push, by @mkruisselbrink Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix drag and drop example Fixes #356 * Update index.bs
Fixes #356
Preview | Diff