Skip to content

Commit

Permalink
fix: add optional chaining for prevAttempts
Browse files Browse the repository at this point in the history
  • Loading branch information
young-robot committed Sep 22, 2023
1 parent 8663014 commit 22c407e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/driver/src/cypress/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ export default {
const replacePreviousAttemptWith = (test) => {
const prevAttempt = _testsById[test.id]

const prevAttempts = prevAttempt.prevAttempts || []
const prevAttempts = prevAttempt?.prevAttempts || []

const newPrevAttempts = prevAttempts.concat([prevAttempt])

Expand Down

0 comments on commit 22c407e

Please sign in to comment.