We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d14047c commit d342c71Copy full SHA for d342c71
src/components/error/GlobalErrorOverlay.react.js
@@ -1,5 +1,6 @@
1
import React, {Component} from 'react';
2
import PropTypes from 'prop-types';
3
+import {concat} from 'ramda';
4
5
import './GlobalErrorOverlay.css';
6
import {FrontEndErrorContainer} from './FrontEnd/FrontEndErrorContainer.react';
@@ -14,14 +15,10 @@ export default class GlobalErrorOverlay extends Component {
14
15
16
let frontEndErrors;
17
if (toastsEnabled) {
- let errors = [];
18
- if (error.frontEnd.length) {
19
- errors = error.frontEnd;
20
- }
21
-
22
- error.backEnd.forEach(backEndError => {
23
- errors.push(backEndError);
24
- });
+ const errors = concat(
+ error.frontEnd,
+ error.backEnd
+ );
25
26
frontEndErrors = (
27
<FrontEndErrorContainer errors={errors} resolve={resolve} />
0 commit comments