Skip to content

Commit

Permalink
fix(): check for console
Browse files Browse the repository at this point in the history
Check if environment has console and console.error
  • Loading branch information
TylorS committed Dec 8, 2015
1 parent 2b0d3d7 commit aad7674
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ const callDrivers =
const noop = () => {}

const logErrorToConsole =
err => console.error(err.stack || err)
err => {
const target = err.stack || err
if (console && console.error) {
console.error(target)
}
}

const replicateMany =
(sinks, sinkProxies) =>
Expand Down

0 comments on commit aad7674

Please sign in to comment.