-
Notifications
You must be signed in to change notification settings - Fork 116
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
Chore: track encoding type for documents #911
Chore: track encoding type for documents #911
Conversation
Verified that @JustinHoldstock has signed the CLA. Thanks for the pull request! |
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.
Does this need a test?
Yup, just wanted to make sure this was fine, first |
src/lib/Preview.js
Outdated
@@ -1524,7 +1524,7 @@ class Preview extends EventEmitter { | |||
* @private | |||
* @return {void} | |||
*/ | |||
emitLoadMetrics() { | |||
emitLoadMetrics({ encoding }) { |
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 feels a little strange IMO to pass in an empty object to emitLoadMetrics
to avoid an error destructuring encoding
from the argument. Would it make sense to instead have logic to handle an undefined argument?
oh and jsdoc for the new method argument.
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 can also just default the params list via { encoding } = {}
…ck/box-content-preview into add-encoding-to-load-event
No description provided.