The analyzer has detected infinite recursion, which will lead to a stack overflow. The exit condition may have been omitted, or the wrong function may have been called.
The example:
function process(element, condition) {
const [el, cond] = handle(element, condition)
const res = process(el, cond)
....
}
This recursive function does not check the exit condition. To fix this, add a check on the cond condition.
The fixed code:
function process(element, condition) {
const [el, cond] = handle(element, condition)
if (cond) {
const res = process(el, cond)
....
}
}
This diagnostic rule is classified as:
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: