In Javascript, I am getting a “too much recursion” error in Firefox and Chrome when attempting to perform the following (simplified example):
const results = [];
for (let i = 0; i < 1000; i++) {
if ("alksdhflasdkhflsakdhflksadjflkdsahf".includes(searchQueryStrippedQuotes)) {
results.push("match");
}
}
I get no error when using a short string for searchQueryStrippedQuotes
, even there is a large number of results to parse through (bump 1,000 here to 30,000, for instance). However, with a long string (more than 6 or 7 words), I get the error.
New contributor
EarnedNothing is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.