Skip to content

Commit

Permalink
fix(browser): use console.warn when possible (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored and Pooya Parsa committed May 8, 2019
1 parent e81f57d commit e386ede
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reporters/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default class BrowserReporter {
log (logObj) {
const consoleLogFn = logObj.level < 1
// eslint-disable-next-line no-console
? (console.__error || console.error) : (console.__log || console.log)
? (console.__error || console.error)
// eslint-disable-next-line no-console
: logObj.level === 1 && console.warn ? (console.__warn || console.warn) : (console.__log || console.log)

// Type
const type = logObj.type !== 'log' ? `[${logObj.type.toUpperCase()}]` : ''
Expand Down

0 comments on commit e386ede

Please sign in to comment.