Skip to content
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

Merged

Conversation

JustinHoldstock
Copy link
Contributor

No description provided.

@boxcla
Copy link

boxcla commented Feb 4, 2019

Verified that @JustinHoldstock has signed the CLA. Thanks for the pull request!

jstoffan
jstoffan previously approved these changes Feb 4, 2019
jstoffan
jstoffan previously approved these changes Feb 4, 2019
Copy link
Collaborator

@jstoffan jstoffan left a 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?

@JustinHoldstock
Copy link
Contributor Author

Does this need a test?

Yup, just wanted to make sure this was fine, first

ConradJChan
ConradJChan previously approved these changes Feb 4, 2019
@@ -1524,7 +1524,7 @@ class Preview extends EventEmitter {
* @private
* @return {void}
*/
emitLoadMetrics() {
emitLoadMetrics({ encoding }) {
Copy link
Contributor

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.

Copy link
Contributor Author

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 } = {}

Justin Holdstock added 2 commits February 5, 2019 10:18
@JustinHoldstock JustinHoldstock merged commit d2a0e46 into box:master Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants