您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

middleware.js 902B

123456789101112131415161718192021222324252627
  1. // @flow
  2. import { StateListenerRegistry } from '../base/redux';
  3. import { setFatalError } from './actions';
  4. declare var APP: Object;
  5. /**
  6. * State listener which emits the {@code fatalErrorOccurred} action which works
  7. * as a catch all for critical errors which have not been claimed by any other
  8. * feature for error recovery (the recoverable flag is not set).
  9. */
  10. StateListenerRegistry.register(
  11. /* selector */ state => {
  12. const { error: conferenceError } = state['features/base/conference'];
  13. const { error: configError } = state['features/base/config'];
  14. const { error: connectionError } = state['features/base/connection'];
  15. return configError || connectionError || conferenceError;
  16. },
  17. /* listener */ (error, { dispatch }) => {
  18. error
  19. && typeof error.recoverable === 'undefined'
  20. && dispatch(setFatalError(error));
  21. }
  22. );