src/index.js
function handleError(reject) {
  return (e) => {
    // prevent global error throw https://bugzilla.mozilla.org/show_bug.cgi?id=872873
    if (typeof e.preventDefault === 'function') e.preventDefault()
    reject(e.target.error)
  }
}
function handleError(reject) {
  return (e) => {
    // prevent global error throw https://bugzilla.mozilla.org/show_bug.cgi?id=872873
    if (typeof e.preventDefault === 'function') e.preventDefault()
    reject(e.target.error)
  }
}
function handleError ( reject ) { return ( e ) => { // prevent global error throw https://bugzilla.mozilla.org/show_bug.cgi?id=872873 if ( typeof e . preventDefault === 'function' ) e . preventDefault ( ) reject ( e . target . error ) } }
Helper to handle errors and call `reject`.

@param {Function} reject - from Promise constructor
@return {Function}
Helper to handle errors and call reject .