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

Skip assertDoc calls in production #3268

Merged
merged 4 commits into from
Nov 16, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc-builders.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function assertDoc(val) {
/* istanbul ignore if */
if (process.env.NODE_ENV === "production") {
if (process.env.NODE_ENV !== "production") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is the right way of doing it, a lot of people will run prettier in "development" env.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azz I updated the PR, can you check again?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, when building the bundle, we will replace that check with "production" to remove that entirely

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. Cool.

if (
!(
typeof val === "string" ||
Expand Down