import { RootReducer } from '../reducers'
var DEVEL_DOMAINS = [
  'localhost',
  '127.0.0.1',
  '[::1]'
]

var isDevel = window._.includes(DEVEL_DOMAINS, window.location.hostname)
const hasDevTools = angular.isDefined(window.__REDUX_DEVTOOLS_EXTENSION__)
/** @ngInject */
export function configure ($logProvider, $compileProvider, $qProvider, $ngReduxProvider) {
  $logProvider.debugEnabled(isDevel)
  $compileProvider.debugInfoEnabled(isDevel)
  $qProvider.errorOnUnhandledRejections(false)
  const storeEnhancers = []
  if (hasDevTools) {
    storeEnhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__())
  }
  $ngReduxProvider.createStoreWith(RootReducer, [], storeEnhancers)
}

import { RootReducer } from '../reducers'
var DEVEL_DOMAINS = [
  'localhost',
  '127.0.0.1',
  '[::1]'
]

var isDevel = window._.includes(DEVEL_DOMAINS, window.location.hostname)
const hasDevTools = angular.isDefined(window.__REDUX_DEVTOOLS_EXTENSION__)
/** @ngInject */
export function configure ($logProvider, $compileProvider, $ngReduxProvider) {
  $logProvider.debugEnabled(isDevel)
  $compileProvider.debugInfoEnabled(isDevel)
  const storeEnhancers = []
  if (hasDevTools) {
    storeEnhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__())
  }
  $ngReduxProvider.createStoreWith(RootReducer, [], storeEnhancers)
}

Revert "Disable $q unhandled rejection exceptions"
Revert "Disable $q unhandled rejection exceptions"

This reverts commit abe7f7f7e646781fff0ddc242223da84e0bc38a3.

Using Promise is wrong with angular,
we should get all unhandled rejection errors,
and fix them.
