Skip to content

Commit

Permalink
chore(validate): use optional chaining for process?.stdin?.isTTY
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Feb 2, 2021
1 parent 1236602 commit 69983a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/validateAndCoerceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ajv.addKeyword('yahooFinanceType', {

ajv.addSchema(schema);

const logObj = process.stdout.isTTY
const logObj = process?.stdout?.isTTY
? (obj:any) => console.dir(obj, { depth: 4, colors: true })
: (obj:any) => console.log(JSON.stringify(obj, null, 2));

Expand Down

0 comments on commit 69983a3

Please sign in to comment.