Remove unnecessary check for PRETTIER_DEBUG (#4506)

master
Lucas Duailibe 2018-05-18 18:18:12 -03:00 committed by GitHub
parent f720cea65f
commit 7d50c25195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 11 deletions

View File

@ -98,17 +98,9 @@ function embed(path, print, textToDoc /*, options */) {
if (commentsAndWhitespaceOnly) {
doc = printGraphqlComments(lines);
} else {
try {
doc = docUtils.stripTrailingHardline(
textToDoc(text, { parser: "graphql" })
);
} catch (error) {
if (process.env.PRETTIER_DEBUG) {
throw error;
}
// Bail if any part fails to parse.
return null;
}
doc = docUtils.stripTrailingHardline(
textToDoc(text, { parser: "graphql" })
);
}
if (doc) {