Browse Source

Fix storybook import raven in logger

master
meriadec 7 years ago
parent
commit
48b19e9dff
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 16
      src/logger.js

16
src/logger.js

@ -148,14 +148,16 @@ export default {
critical: (error: Error) => {
addLog('critical', error)
console.error(error)
try {
if (typeof window !== 'undefined') {
require('sentry/browser').captureException(error)
} else {
require('sentry/node').captureException(error)
if (!process.env.STORYBOOK_ENV) {
try {
if (typeof window !== 'undefined') {
require('sentry/browser').captureException(error)
} else {
require('sentry/node').captureException(error)
}
} catch (e) {
console.warn("Can't send to sentry", error, e)
}
} catch (e) {
console.warn("Can't send to sentry", error, e)
}
},

Loading…
Cancel
Save