Skip to content

Commit

Permalink
fix: use older JS syntax, closes #40
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Oct 7, 2022
1 parent f910498 commit 718e086
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const debug = require('debug')('cypress-if')

const isIfCommand = (cmd) => cmd?.attributes?.name === 'if'
const isIfCommand = (cmd) =>
cmd && cmd.attributes && cmd.attributes.name === 'if'

function skipRestOfTheChain(cmd, chainerId) {
while (
Expand Down

0 comments on commit 718e086

Please sign in to comment.