src/web/utils/has-soft-error.js
/**
 * Determine whether or not this page has a soft error (Error message) showing
 *
 * @param {object} page Page containing an array of children
 * @returns {boolean}
 */
Determine whether or not this page has a soft error (Error message) showing
@param {object} page Page containing an array of children
@returns {boolean}
Determine whether or not this page has a soft error ( Error message ) showing @param { object } page Page containing an array of children @returns { boolean }
function hasSoftError({ children = [] }) {
  return children.reduce((sum, node) => (
    sum
      || node.type === 'Error'
      || (node.children && hasSoftError(node))
  ), false);
}
function hasSoftError ( { children = [ ] } ) { return children . reduce ( ( sum , node ) => ( sum || node . type === 'Error' || ( node . children && hasSoftError ( node ) ) ) , false ) ; }
Determine whether or not this page has a soft error (Error message) showing
 @param {object} page Page containing an array of children
 @returns {boolean}
Determine whether or not this page has a soft error ( Error message ) showing @param { object } page Page containing an array of children @returns { boolean }