Skip to content

Commit

Permalink
simplify activeSpecBridgeOriginPolicyIfApplicable code as it is alrea…
Browse files Browse the repository at this point in the history
…dy an originPolicy
  • Loading branch information
AtofStryker committed May 23, 2022
1 parent 044f09b commit 2ee5441
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/driver/src/cypress/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,7 @@ export class Log {

if (this.config('experimentalSessionAndOrigin') && !Cypress.isCrossOriginSpecBridge) {
// @ts-ignore
const { originPolicy: activeSpecBridgeOriginPolicyIfApplicable } = this.state('currentActiveOriginPolicy') ? Cypress.Location.create(this.state('currentActiveOriginPolicy')) : {
originPolicy: undefined,
}
const activeSpecBridgeOriginPolicyIfApplicable = this.state('currentActiveOriginPolicy') || undefined
// @ts-ignore
const { originPolicy: originPolicyThatIsSoonToBeOrIsActive } = Cypress.Location.create(this.state('anticipatingCrossOriginResponse')?.href || this.state('url'))

Expand Down

0 comments on commit 2ee5441

Please sign in to comment.