https://cypress.io logo
I got "Maximum call stack size exceeded" when usin...
# e2e-testing
n
I got "Maximum call stack size exceeded" when using the below function. the function realizes when "div" >0, click '.fc-prev-button, and click '.fc-next-button' when div<0. the function stop when div==0. Anyone has some suggestions? Thank you!!! function getTargetMonth(div) { cy.then(() => { if (div > 0) { cy.get('.fc-prev-button').click() div - 1; } else if (div < 0) { cy.get('.fc-next-button').click() div + 1; } else return }) getTargetMonth(div) }