Skip to content

Commit

Permalink
revert window:load error wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Jan 3, 2022
1 parent 3d28da1 commit 5cef955
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/driver/src/cypress/cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import debugFn from 'debug'

import $dom from '../dom'
import $utils from './utils'
import $errUtils, { CypressError, ErrorFromProjectRejectionEvent } from './error_utils'
import $errUtils, { ErrorFromProjectRejectionEvent } from './error_utils'
import $stackUtils from './stack_utils'

import { create as createChai, IChai } from '../cy/chai'
Expand Down Expand Up @@ -550,13 +550,7 @@ export class $Cy extends EventEmitter2 implements ITimeouts, IStability, IAssert
const r = this.state('reject')

if (r) {
const wrappedErr = ($errUtils.errByPath('uncaught.fromSpec', {
errMsg: err.message,
promiseAddendum: '',
}) as CypressError)
.setUserInvocationStack(err.stack)

return r(wrappedErr)
return r(err)
}
}

Expand Down

0 comments on commit 5cef955

Please sign in to comment.