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. 2
      src/logger.js

2
src/logger.js

@ -148,6 +148,7 @@ export default {
critical: (error: Error) => { critical: (error: Error) => {
addLog('critical', error) addLog('critical', error)
console.error(error) console.error(error)
if (!process.env.STORYBOOK_ENV) {
try { try {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
require('sentry/browser').captureException(error) require('sentry/browser').captureException(error)
@ -157,6 +158,7 @@ export default {
} catch (e) { } catch (e) {
console.warn("Can't send to sentry", error, e) console.warn("Can't send to sentry", error, e)
} }
}
}, },
exportLogs: (): Array<{ type: string, date: Date, args: Array<any> }> => exportLogs: (): Array<{ type: string, date: Date, args: Array<any> }> =>

Loading…
Cancel
Save