examples/react-firebase-redux/src/utils/errorHandler.js
function initStackdriverErrorReporter() {
  if (typeof window.StackdriverErrorReporter === 'function') {
    window.addEventListener('DOMContentLoaded', () => {
      const errorHandler = new window.StackdriverErrorReporter()
      errorHandler.start({
        key: firebase.apiKey,
        projectId: firebase.projectId,
        service: 'react-firebase-redux-site',
        version
      })
    })
  }
  return errorHandler
}
function initStackdriverErrorReporter() {
  if (typeof window.StackdriverErrorReporter === 'function') {
    window.addEventListener('DOMContentLoaded', () => {
      const errorHandler = new window.StackdriverErrorReporter()
      errorHandler.start({
        key: firebase.apiKey,
        projectId: firebase.projectId,
        service: 'react-firebase-redux-site',
        version
      })
    })
  }
  return errorHandler
}
function initStackdriverErrorReporter ( ) { if ( typeof window . StackdriverErrorReporter === 'function' ) { window . addEventListener ( 'DOMContentLoaded' , ( ) => { const errorHandler = new window . StackdriverErrorReporter ( ) errorHandler . start ( { key : firebase . apiKey , projectId : firebase . projectId , service : 'react-firebase-redux-site' , version } ) } ) } return errorHandler }
Initialize Stackdriver Error Reporter only if api key exists
Initialize Stackdriver Error Reporter only if api key exists